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:
__author__ = 'Think'
n=int(input())
parity=((n-1)//2)%2
def cell(r, c):
	r=min(r, n+1-r)
	c=min(c, n+1-c)
	id=max(r, c)
	return (id-parity)%2
odd=-1
even=0
def get(par, odd, even):
	if par==0:
		even+=2
		return even, odd, even
	if par==1:
		odd+=2
		return odd, odd, even
for r in range(1, n+1):
	for c in range(1, n+1):
		(val, odd, even)=get(cell(r, c), odd, even)
		print(val, end="")
		if c!=n:
			print(" ", end="")
	print()