n=int(input())
x=[]
for i in range(1,n+1):
    if i==1:
        x.append([i])
    x.append([1,*[x[i-1][j-1]+x[i-1][j] for j in range(1,i)],1])
for i in x[:-1]:
    for j in i:
        print('{:>5d}'.format(j), end='')
    print()