 Final
 Elimination
 Third qual
 Second qual
 First qual
 Warmup
Second qualification round completed
Tasks
Show one task per page / all tasks on one page
Time limit  1 second 

Memory limit  256 megabytes 
Opening ceremony of the new campus of N State University will be visited by nm very important persons. The ceremony will take place in a hall that has the form of a rectangle, seats in the hall are arranged in n rows, m seats in each row. Rows are numbered from 1 to n, seats in each row are numbered from 1 to m, the jth seat of the ith row is denoted as (i, j).
The organizers of the ceremony have numbered the guests from 1 to nm in accordance with their importance — the greater, the more important. The most important guest, the mayor of the city, gets the number nm. The mayor is planning to take seat (1, 1). Now the other guests must be assigned seats. The guests must be arranged according to their importance, there must be no situation that a guest with greater number is seating further from the mayor than a guest with smaller number. The distance between two seats (r_{1}, s_{1}) and (r_{2}, s_{2}) is measured as r_{1}  r_{2} + s_{1}  s_{2}.
Help the organizers to assign guests to seats.
Input format 
Input contains several test cases. The first line contains the number of test cases t (1 ≤ t ≤ 400). Each test case is specified with a line that contains two integers: n and m (1 ≤ n, m ≤ 20). 

Output format 
For each test case output the hall plan after the seats are assigned to guests. Output n lines, each line must contain m integers, the jth integer of the ith line must be equal to the importance of the guest that will be assigned the seat (i, j). If there are several valid ways to assign seats to guests, output any of them. 
Examples 
Input data
2 2 3 3 2
Output data
6 4 2 5 3 1 6 4 5 2 3 1 
