Let the -th equation of a system of equations be as follows:
where
Thus, the left side of each equation contains (N-1) terms, and each unknown appears in exactly two equations of the system.
Write a program that, given b_1, \dots, b_N, finds one solution to the system, under the condition that the unknowns x_{ij} can take only the values or .
The first line of the input file contains a natural number — the number of test cases. Each test case starts with a line containing the number (3 \leq N \leq 50) — the number of equations in the system. The second line of each test case contains integers b_i (0 \leq b_i \leq 50).
For each test case, output one solution to the system: (N-1) lines, each -th of which contains N-k numbers — the found values of the unknowns:
If the system has no solutions for a test case, output a single line containing .
Example 1