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:

def ind (i, j, len) :
    mid = int(len / 2)
    if(mid == i or mid == j):
        return 1
    if(i < mid):
        if(j < mid):
            if(j >= i):
                return 0
            else:
                return 1
        elif(i + j >= len):
            return 1
        else:
            return 0
    elif(j < mid):
        if (i + j + 1 >= len):
            return 0
        else:
            return 1
    else:
        if(j > i):
            return 1
        else:
            return 0

len = int(input())

evn = 1;
odd = 2;

for i in range(len):
    str1 = "";
    for j in range(len):
        if( ind(i, j, len) == 1):
            str1 += str(evn) + " "
            evn += 2
        else:
            str1 += str(odd) + " "
            odd += 2
    print(str1)