Ho, Ho, Ho!
It's Christmas time and our friendly grandpa Santa Claus is busy distributing gifts to all the nice children. With the rising population, Santa's workload every year gets increased and he seeks your help to wrap the gifts with fancy wrapping papers while he gets them distributed. 
Everything was going great until you realised that you'll fall short of wrapping paper. But luckily, you get a very innovative idea, that will allow you to pack all the remaining gifts without worrying about lack of wrapping paper. Any guesses what the idea is? Using ice for wrapping, obviously! That's the only thing available at the North Pole.
Now, in order to reduce your trips to the ice factory, you decide to write a program that helps you visualize how much ice is needed for a particular gift. 

-----Input:-----
Input will consist of a single line with size $n$.

-----Output:-----
Print the ice wrapped gift box for the given size. 

-----Constraints-----
- $0 \leq n \leq 1000$

-----Sample Input:-----
4

-----Sample Output:-----
4 4 4 4 4 4 4
4 3 3 3 3 3 4
4 3 2 2 2 3 4
4 3 2 1 2 3 4
4 3 2 2 2 3 4 
4 3 3 3 3 3 4
4 4 4 4 4 4 4

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
def read_i_l(l=False):
	m = list(map(int, input().strip().split(' ')))
	if l:
		return list(m)
	else:
		return m

def i():
	return int(input().strip())
T = i()
L = []
if T >= 1:
	L = ['1']
for i in range(2, T + 1):
	nL = [str(i) + (2 * i - 2) * (' ' + str(i))]
	for l in L:
		nL.append(str(i) + ' ' + l + ' ' + str(i))
	nL.append(str(i) + (2 * i - 2) * (' ' + str(i)))
	L = nL
for l in L:
	print(l)


num = int(input())
mat = [[-1 for i in range(num * 2 - 1)] for j in range(num * 2 - 1)]
cs = 0
rs = 0
re = len(mat) - 1
ce = len(mat) - 1
while num:
	t = num * 2 - 1
	for i in range(cs, ce + 1):
		mat[rs][i] = num
		mat[re][i] = num
	for j in range(rs, re):
		mat[j][cs] = num
		mat[j][ce] = num
	num -= 1
	rs += 1
	cs += 1
	re -= 1
	ce -= 1
for i in mat:
	print(*i)


n = int(input())
if n == 0:
	print()
elif n == 1:
	print(1)
elif n == 2:
	print(2, 2, 2)
	print(2, 1, 2)
	print(2, 2, 2)
else:
	l = [i for i in range(1, n + 1)]
	a = []
	for i in range(2 * n - 1):
		a1 = []
		for i in range(2 * n - 1):
			a1.append(0)
		a.append(a1)
	col1 = 0
	coln = 2 * n - 2
	row1 = 0
	rown = 2 * n - 2
	c = n
	while True:
		for i in range(2 * n - 1):
			if a[i][col1] == 0:
				a[i][col1] = c
		for i in range(2 * n - 1):
			if a[i][coln] == 0:
				a[i][coln] = c
		for i in range(2 * n - 1):
			if a[row1][i] == 0:
				a[row1][i] = c
		for i in range(2 * n - 1):
			if a[rown][i] == 0:
				a[rown][i] = c
		c -= 1
		if c == 0:
			break
		col1 += 1
		coln -= 1
		row1 += 1
		rown -= 1
	for i in a:
		print(*i)


n = int(input())
l = [[1]]
if n == 1:
	pass
else:
	i = 2
	while i <= n:
		l1 = [i for j in range(2 * i - 3)]
		l.insert(0, l1)
		for j in l:
			j.append(i)
			j.insert(0, i)
		i += 1
for i in l:
	print(*i)
for i in range(len(l) - 2, -1, -1):
	print(*l[i])


n = int(input())
a = []
size = 2 * n - 1
b = [n] * size
size -= 2
curr = n - 1
a.append(b)
for i in range(n - 1):
	c = b.copy()
	c[i + 1:i + 1 + size] = [curr] * size
	a.append(c)
	b = c.copy()
	curr -= 1
	size -= 2
for i in range(len(a)):
	print(*a[i])
for i in range(len(a) - 2, -1, -1):
	print(*a[i])


n = int(input())
if n == 0:
	print(0)
else:
	l = [[0 for i in range(2 * n - 1)] for j in range(2 * n - 1)]
	for i in range(1, 2 * n):
		k = []
		for j in range(1, 2 * n):
			d = max(abs(i - n), abs(j - n))
			k.append(d + 1)
		print(*k)


def replace(l, key, i, j):
	for k in range(i, j + 1):
		l[k] = str(key)
n = int(input())
s = str(n)
i = 0
j = n * 2 - 2
key = n
m = []
l = (n * 2 - 1) * s.split()
for i in range(int((n * 2 - 2) / 2) + 1):
	replace(l, key, i, j)
	key -= 1
	j -= 1
	m.append(' '.join(l))
for j in range(n - 2, -1, -1):
	m.append(m[j])
for p in m:
	print(p)


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return list(map(int, inp().split()))

def smp():
	return list(map(str, inp().split()))

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
n = int(inp())
t = False
k = 0
ml = [str(n) for i in range(2 * n - 1)]
while k > 0 or not t:
	k += -1 if t else 1
	print(' '.join(ml))
	for i in range(k, 2 * n - 1 - k):
		ml[i] = str(n - k)
	if k == n - 1:
		t = True
print(' '.join(ml))