710_C. Magic Odd Square
Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd.

Input

The only line contains odd integer n (1 ≤ n ≤ 49).

Output

Print n lines with n integers. All the integers should be different and from 1 to n2. The sum in each row, column and both main diagonals should be odd.

Examples

Input

1


Output

1


Input

3


Output

2 1 4
3 5 7
6 9 8
```python
n = int(input())
if n==1:
    print(1)
    exit()

odd = 1
evn = 2



table = [[0 for i in range(n)] for i in range(n)]

#(x,y) x row, y col
for x in range(n):
    for y in range(n):
        x1 = min(x, n-1-x)
        if y < (n - 1)/2-x1 or y > (n - 1)/2+x1:              #even con
            table[x][y] = evn
            evn += 2
        else:
            table[x][y] = odd
            odd += 2

for x in table:
    for y in x:
        print(y, end=" ")
    print()

```