#C761. Rotated Rectangle Matrix

    ID: 51500 Type: Default 1000ms 256MiB

Rotated Rectangle Matrix

Rotated Rectangle Matrix

You are given a positive even integer n, and you are required to generate a Rotated Rectangle Matrix (RRM) of size n×n. The element at row i and column j (0-indexed) is computed using the formula: $$a_{ij} = j \times n + i + 1$$.

For each test case, your program should output the matrix row by row, with each row printed on a new line and the elements separated by a single space.

If there are multiple test cases, the output matrices should be concatenated in the order of input, without any extra separators.

inputFormat

The first line of input contains a single integer T representing the number of test cases. Each of the following T lines contains one positive even integer n for which the matrix is to be generated.

outputFormat

For each test case, output the corresponding Rotated Rectangle Matrix. Each row of the matrix should be output on a separate line with its elements separated by a single space. The outputs for different test cases should be printed one after another.

## sample
1
2
1 3

2 4

</p>