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:
N = int(input())
cnt = 0
the_odd = -1
the_eve = 0
def get_with_eve_N(x, y) :
	return -1
def get_with_odd_N(x, y) :
	global the_odd
	global the_eve
	if (x + y <= N + 1 >> 1 or x + y >= N + (N + 1 >> 1) + 1 or y - x >= N + 1 >> 1 or x - y >= N + 1 >> 1) :
		the_eve += 2
		return the_eve
	else :
		the_odd += 2
		return the_odd
if N % 2 == 0 :
	for i in range(1, N + 1) :
		for j in range(1, N + 1) :
			if j == N :
				print(get_with_eve_N(i, j))
			else :
				print(get_with_eve_N(i, j), end = ' ')
else :
	for i in range(1, N + 1) :
		for j in range(1, N + 1) :
			if j == N :
				print(get_with_odd_N(i, j))
			else :
				print(get_with_odd_N(i, j), end = ' ')