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:
# -*- coding:utf-8 -*-
import sys

def some_func():
    """
    """
    n = input()
    nn = n**2
    lit1 = []
    lit2 = []
    all_lit = []
    result_lit = []
    for i in range(1,nn+1,2):
        lit1.append(i)
    for i in range(2,nn+1,2):
        lit2.append(i)


    for i in range(1,n/2+1):
        all_lit.append('0'*((n+1)/2-i)+'1'*(2*i-1)+'0'*((n+1)/2-i))


    for i in range(0,n/2+1):
        all_lit.append('0'*(i)+'1'*(n-2*i)+'0'*(i))

    for i in range(n):
        for j in range(n):
            if all_lit[i][j]=='1':
                result_lit.append(lit1.pop())
            else:
                result_lit.append(lit2.pop())

    for i in range(n):
        for j in range(n):
            print result_lit[i*n+j],
        print ''



if __name__ == '__main__':
    some_func()