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())
answer = [[0] * n] * n

even = []
not_even = []

for i in range(1, n ** 2 + 1):
    if i % 2 == 0:
        even.append(i)
    else:
        not_even.append(i)

levels = [(0, 0)] * n

if n == 1:
    print(1)
else:
    for i in range(n):
        if i > n // 2:
            middle_r = levels[n - i - 1][1]
            middle_l = levels[n - i - 1][0]
        else:
            middle_r = max(n // 2 + i, n // 2 - i)
            middle_l = min(n // 2 - i, n // 2 + i)
            levels[i] = (middle_l, middle_r)
        for j in range(n):
            if middle_r >= j >= middle_l:
                print(not_even.pop(len(not_even) - 1), end=' ')
            else:
                print(even.pop(len(even) - 1), end=' ')
        print('\n')