Many puzzles (Sudoku, towers, etc.) require filling the square field $$$ n \times n $$$ with numbers in such a way that in each row and each column the numbers $$$ 1...n $$$ occur exactly once. For the computer construction of such puzzles, it is necessary to be able to generate a square field with the specified property.
Write a program, that given the first row, fills in the remaining cells of the table so that each row and each column contain all the numbers from $$$ 1 $$$ to $$$ n $$$.
The first line contains the size of the table $$$ n $$$ ($$$ 1 \leq n \leq 100 $$$). The second line contains $$$ n $$$ numbers separated by spaces – the contents of the first row of the table. The line consists of non-repeating numbers from $$$ 1 $$$ to $$$ n $$$.
Output $$$ n $$$ lines of $$$ n $$$ numbers in each – the assumed input of the table. Adjacent numbers in the line must be separated by exactly one space.
4 1 2 3 4
1 2 3 4 2 3 4 1 4 1 2 3 3 4 1 2
| Name |
|---|


