


There is only one space between the values of each column in a row.
For example, Pattern for ‘N’ = 5 will be.
1 2 3 4 5
11 12 13 14 15
21 22 23 24 25
16 17 18 19 20
6 7 8 9 10
The first line contains an integer 'T' which denotes the number of test cases or queries to be run.
The first line of each test case contains a single integer ‘N’ denoting the number of rows for which pattern needs to be printed.
The output of each test case will be 'N' strings denoting the pattern printed for the given ‘N’ number of rows.
The output of each test case will be printed on a separate line.
1 <=T <= 5
1 <= N <= 100
Where ‘T’ is the total number of test cases and ‘N’ is the given number of rows for which pattern needs to be printed.
Time limit: 1 sec
We can observe that there are ‘N’ numbers of rows (where ‘N’ is the total number of rows to be printed). Each row contains a different value in the first column and its value increments by 1 for each subsequent column.