A magic square is a special $N \times N$ matrix: it is composed of the numbers $1, 2, 3, \dots, N \times N$, and the sum of the numbers in each row, each column, and both diagonals are the same.
When $N$ is odd, we can construct a magic square using the following method:
First, write $1$ in the middle of the first row.
After that, fill in each number $K$ ($K = 2, 3, \dots, N \times N$) in increasing order according to the following rules:
- If $(K-1)$ is in the first row but not in the last column, then $K$ is placed in the last row, in the column to the right of $(K-1)$.
- If $(K-1)$ is in the last column but not in the first row, then $K$ is placed in the first column, in the row above $(K-1)$.
- If $(K-1)$ is in the last row and the last column, then $K$ is placed directly below $(K-1)$.
- If $(K-1)$ is neither in the first row nor in the last column, and the cell to the upper-right of $(K-1)$ is not yet filled, then $K$ is placed in the upper-right of $(K-1)$; otherwise, $K$ is placed directly below $(K-1)$.
Given $N$, please construct the $N \times N$ magic square using the method described above.
Input
The input consists of a single line containing an integer $N$, representing the size of the magic square.
Output
The output contains $N$ lines, each containing $N$ integers, representing the $N \times N$ magic square constructed by the method above. Adjacent integers in a row are separated by a single space.
Examples
Input 1
3
Output 1
8 1 6 3 5 7 4 9 2
Input 2
5
Output 2
17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
Constraints
For $100\%$ of the data, $1 \le N \le 39$ and $N$ is odd.