Park
Before the elections, the city mayor decided to create a recreational park. For this purpose, a site in the city center, shaped like an equilateral triangle, was cleared. There are N political parties competing in the elections. To demonstrate his neutrality, the mayor has decided to plant N different colored trees in the park. These trees must be placed at the vertices of a triangular grid (as shown in the figure) with equal spacing between each. In every row that runs parallel to one of the triangle's sides, trees of different colors must be paired, and the outer edges of the site must each contain exactly N trees, representing all colors.
Write a program, PARK, that will determine one possible arrangement of trees in the park.
Input
The first line of the input file contains the number of test cases. Each subsequent line contains a single integer N — the number of different types (colors) of trees to be planted in the park (3 ≤ N ≤ 100).
Output
The output file should provide the results for all test cases in the order they appear in the input file. For each test case, output a single line with the number 0 if the arrangement is impossible. Otherwise, output N lines: the first line should contain one number, the second line two numbers, and the N-th line should contain N numbers, representing the colors of the trees in the arrangement. Colors are numbered with natural numbers from 1 to N.