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:
size = int(input())
square = [[0 for j in range(2 * size - 1)] for i in range(2 * size - 1)]
counter = 1
dj = 0
for i in range(size):
    di = size - 1
    for j in range(size):
        square[i + di][j + dj] = counter
        counter += 1
        di -= 1
    dj += 1
for j in range(size // 2):
    for i in range(2 * size - 1):
        square[i][j - (size // 2) * 2] = square[i][j] or square[i][j - (size // 2) * 2]
        square[i][j] = 0
        square[i][j + (size // 2)] = square[i][j - (size // 2)] or square[i][j + (size // 2)]
        square[i][j - (size // 2)] = 0
        square[j - (size // 2) * 2][i] = square[j][i] or square[j - (size // 2) * 2][i]
        square[j][i] = 0
        square[j + (size // 2)][i] = square[j - (size // 2)][i] or square[j + (size // 2)][i]
        square[j - (size // 2)][i] = 0
square = [square[i][size // 2: 2 * size - 1 - size // 2] for i in range(size // 2, 2 * size - 1 - size // 2)]
for i in range(len(square)):
    for j in range(len(square[i])):
        print(square[i][j], end = ' ')
    print()