K-Special Cells
You are given a matrix which has special cells in it. You have to reach from . From any cell, you can only move rightwards or downwards.
The special cells are those cells in this grid which have special strength at them. -th special cell has units of strength and if you travel through this cell, you store the strength.
Find the total strength you can store after travelling through all the possible paths in the grid to reach cell .
Note that:
The strength of a path is the sum of strength of all the special cells that are visited in this path.
The cells that are not special have power quotient equals to zero.
Input
The first line contains the total number of test cases .
The first line of each test case contains three space separated integers and where is the size of grid and is the total number of special cells in the grid. Each of next lines contains , and where is the location of special cell and is the cell strength.
Output
For each test case, print in a new line a single integer representing the total strength that you can store, as the total strength can be too large, print it modulo .