from itertools import accumulate
def func(s):
l=list(accumulate(range(1,s+1)))
ll =[]
lll = []
lll.append(l)
for i in range(s):
if i > 0:
ll=list(map(lambda x,y:x+y,lll[i-1],list(range(i,s))))
lll.append(ll)
return lll
while True:
try:
s = int(input())
for i in func(s):
print(*i)
except:
break