human
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
assistant
#Here is Python program to 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.

#imports
import sys
sys.setrecursionlimit(30000)

from collections import Counter, defaultdict, deque
from math import ceil, floor, factorial, fsum, isinf, exp, log, log10, log2, isfinite, sqrt
from math import pi as PI, e as E
from fractions import Fraction
from itertools import starmap, tee, chain, filterfalse, combinations as combos
from itertools import permutations as perms, product as prod, combinations_with_replacement as rcombos
from functools import reduce, partial
import operator as ops #lt, le, eq, ne, ge, gt,  xor  notit, lshift, rshift,      neg, add, mul, sub,
from operator import __not__ as notit
from operator import __abs__ as absit
from operator import __or__ as orit

#PI, E, PHI, INF
PHI, PHI2 = (1 + 5 ** 0.5) / 2, (5 ** 0.5 - 1) / 2
INF = float('inf')

#structures
class TreeNode:
    def __init__(self, v):
        self.val = v
        self.left = None
        self.right = None

#Bit Manipulation
#<<, >>, bin(), int(s, 2)
def setBit(x, offset):
    return x | 1 << offset #RHS: mask
def clearBit(x, offset):
    return x & ~(1 << offset) #RHS: mask
def getBit(x, offset):
    return 1 if testBit(x, offset) > 0 else 0
def testBit(x, offset):
    return x & 1 << offset #RHS: mask
def flipBitAt(x, offset):
    return x ^ 1 << offset #RHS: mask
def flipBits(x, length=-1): #default: x.bit_length() - 1
    length = x.bit_length()-1 if length == -1 else length
    return x ^ (1 << length) - 1
def numBits(x):
    return x.bit_length() #int.bit_length()
def countOnes(x):
    return bin(x).count('1')
def countZeros(x, length=-1):
    length = x.bit_length() if length == -1 else length
    return length - countOnes(x)

#IO
def getList(tcast=str):
    return [tcast(x) for x in input().strip().split(' ')]
def getItems(*tcast):
    return map(lambda f, x: f(x), tcast, getList())
def getVal(tcast=str):
    return tcast(input().strip())
def getMatrix(r, tcast=str):
    return [getList(tcast) for row in range(r)]

#Math
def isOdd(n):
    return n & 1 > 0
def isEven(n):
    return not n & 1
def numDigits(n):
   ...