DreamGrid, the king of Gridland, is making a knight tournament. There are $$$n$$$ knights, numbered from 1 to $$$n$$$, participating in the tournament. The rules of the tournament are listed as follows:
As DreamGrid's general, you are asked to write a program to arrange all the duels in all the $$$k$$$ rounds, so that the resulting arrangement satisfies the rules above.
There are multiple test cases. The first line of the input is an integer $$$T$$$, indicating the number of test cases. For each test case:
The first and only line contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le n, k \le 1000$$$), indicating the number of knights participating in the tournament and the number of rounds.
It's guaranteed that neither the sum of $$$n$$$ nor the sum of $$$k$$$ in all test cases will exceed 5000.
For each test case:
If there are multiple valid answers, output the lexicographically smallest answer.
Consider two answers $$$A$$$ and $$$B$$$, let's denote $$$a_{i, j}$$$ as the $$$j$$$-th integer on the $$$i$$$-th line in answer $$$A$$$, and $$$b_{i, j}$$$ as the $$$j$$$-th integer on the $$$i$$$-th line in answer $$$B$$$. Answer $$$A$$$ is lexicographically smaller than answer $$$B$$$, if there exists two integers $$$p$$$ ($$$1 \le p \le k$$$) and $$$q$$$ ($$$1 \le q \le n$$$), such that
Please, DO NOT output extra spaces at the end of each line, or your answer may be considered incorrect!
2
3 1
4 3
Impossible
2 1 4 3
3 4 1 2
4 3 2 1