Problem: 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

Solution (in PYTHON3):

Solution:
n = int(input())

square = [[0 for x in range(n)] for y in range(n)]

toInsert = (n*n)//2 + 1
np = 1

for i in range(n):
    if square[i][n//2] == 0:
        toInsert -= 1
        square[i][n//2] = np
        np = np + 2
    if square[n//2][i] == 0:
        toInsert -= 1
        square[n // 2][i] = np
        np = np + 2

def exiting():
    p = 2
    for i in range(n):
        for(j) in range(n):
            if(square[i][j] == 0):
                square[i][j] = p
                p += 2
            print(square[i][j], end=" ")
        print()
    exit()

if (toInsert <= 0):
    exiting()

for i in range(n//2):
    for j in range(n//2):
        if(toInsert <= 0):
            exiting()
        toInsert -= 4
        square[i][j] = np
        np = np + 2
        square[n-1-i][j] = np
        np = np + 2
        square[i][n-1-j] = np
        np = np + 2
        square[n-1-i][n-1-j] = np
        np = np + 2