You are given an n×n chessboard, the rows and columns of which are numbered from 1 to n respectively. Little Q punched several holes in specified locations: the i-th hole is located at (r_i,c_i).
Little Q also has a pet dog. Now, the dog is getting lost on the chessboard at the cell (r_0,c_0). It will move to a random adjacent cell every second. Each of the adjacent cells is selected with equal probability. Here, two cells are adjacent if they share a common edge. If the dog arrives at a cell with a punched hole, it will fall into the hole.
Now, Little Q is wondering: for each hole, what is the expected number of seconds that the pet walks on the chessboard, given that it finally falls into this hole? Please help him.
The first line contains an integer T (1≤T≤20), the number of test cases. For each test case:
The first line contains two integers n and k (2≤n≤200, 1≤k≤200) indicating the size of the given chessboard and the number of holes.
Then k lines follow, the i-th of which contains two integers r_i and c_i (1≤r_i,c_i≤n) indicating the location of the i-th hole.
The last line of each test case contains two integers r_0 and c_0 (1≤r_0,c_0≤n) denoting the starting location of the pet.
It is guaranteed that all given holes are distinct, and the pet is not located at a hole initially. It is also guaranteed that max(n,k)>5 holds in at most one test case.
For each test case, output a single line with k integers: for each hole, in the order they are given in the input, print the expected number of seconds the pet walks on the chessboard, given that it finally falls into this hole.
More precisely, if a hole is reachable and the reduced fraction of the expected number of seconds is qp, you should output the minimum non-negative integer r such that q⋅r≡p(mod109+7). You may safely assume that such r always exists in all test cases. If a hole is unreachable, output "-1" instead.