while True:
    try:
        max=int(input())+1
        shuzhu1=[([1]*max)for i in range(max)]
        c=max+1
        for i in range(1,max):
            shuzhu1[i][1]=shuzhu1[i-1][1]+(i-1)
            ca=i+1
            c=c-1
            for j in range(2,c):
                shuzhu1[i][j]=shuzhu1[i][j-1]+ca
                ca+=1
                c=max+1
        for i in range(1,max):
            c=c-1
            for j in range(1,c):
                print(shuzhu1[i][j],end=" ")
            print("")
    except:
        break