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:
    
    
def main():
    N = input()
    board = [[0]*N for i in range(N)]

    odd = 1
    
    for i in range(N):
        board[i][N/2] = odd
        odd += 2

        if(i != N/2):
            board[N/2][i] = odd
            odd += 2

    for i in range(N):
        if(odd >= N*N):
            break
        
        for j in range(N/2):
            board[i][j] = odd
            board[i][N-j-1] = odd + 2
            board[N-i-1][j] = odd + 4
            board[N-i-1][N-j-1] = odd + 6
                
            odd += 8

            if(odd >= N*N):
                break

    even = 2
    
    for i in range(N):
        for j in range(N):
            if(board[i][j] == 0):
                board[i][j] = even
                even += 2
                
    for i in range(N):
        for j in range(N):
            print board[i][j],
        print

##########################################
##########################################
##########################################
if(__name__ == "__main__"):
    main()