CODE FOR EVEN MATRIX QUESTION

Constraints: 1≤T≤10 1≤N≤103 the sum of N over all test cases does not exceed 103

#Input The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows. The first and only line of each test case contains a single integer N

#Output For each test case, print N lines describing a delicious matrix M. For each valid i, the i-th of these lines should contain N space-separated integers Mi,1,Mi,2,…,Mi,N.

Example Input

1 2

Example Output

1 2 4 3