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 PYTHON):

Solution:
n = int(raw_input())

def solve(n):
    ans = [[0 for _ in xrange(n)] for _ in xrange(n)]
    m = n/2
    for i in xrange(n): ans[m][i] = 1
    s,e = 1,n-1
    for i in xrange(1,m+1):
        for j in xrange(s,e):
            ans[m+i][j] =1
            ans[m-i][j]= 1
        s += 1
        e -= 1
    return ans

def solve2(p):
    odd,even = 1,2
    for i in xrange(len(p)):
        for j in xrange(len(p[i])):
            if p[i][j] == 1:
                p[i][j] = odd
                odd +=2
            else:
                p[i][j] = even
                even +=2
    return p
    

p = solve(n)
p = solve2(p)

for i in xrange(len(p)):
    print " ".join(map(str,p[i]))