x=int(input())

for i in range(0,x,1):
	a=x
	while(a>i+1):
		print(" ",end=" ") 
		a=a-1
	while(a>0):
		print (a,end=" ")
		a=a-1
	print("\n")
ade804dc7a06494587fe871c1c1171216f45e3fc
<mask token>

<mask token>
for i in range(0, x, 1):
    a = x
    while a > i + 1:
        print(' ', end=' ')
        a = a - 1
    while a > 0:
        print(a, end=' ')
        a = a - 1
    print('\n')

x = int(input())
for i in range(0, x, 1):
    a = x
    while a > i + 1:
        print(' ', end=' ')
        a = a - 1
    while a > 0:
        print(a, end=' ')
        a = a - 1
    print('\n')

x=int(input())

for i in range(0,x,1):
	a=x
	while(a>i+1):
		print(" ",end=" ") 
		a=a-1
	while(a>0):
		print (a,end=" ")
		a=a-1
	print("\n")