# for i in range(0,5):
#     if (i>3):
#         continue
#     print(i)


    # for j in range(0,5):
    #     print(j)
    #     if i>=3:
    #         break
    # print("")

# for i in "apples":
#     if i == "a" or i == "s":
#         continue
#     print(i)

for i in range (4,0,-1):
    for j in range(0,i):
        print(j, end = " ")
        
    print('')
    