A natural number N is given (N<=15). Fill and display a square two-dimensional NxN array according to the following rule:
1 2 3 4 5 6
2 3 4 5 6 1
3 4 5 6 1 2
4 5 6 1 2 3
5 6 1 2 3 4
6 1 2 3 4 5
Each element of the array is separated from the other by one space, each line of the array is displayed on a new line
Sample Input and Output
Test No. |
Input data |
Imprint |
1 |
6 |
1 2 3 4 5 6
2 3 4 5 6 1
3 4 5 6 1 2
4 5 6 1 2 3
5 6 1 2 3 4
|