n = int(input())
count = 1

for i in range(0, n):

    for j in range(0, i + 1):

        print(str(count)+" ", end="")
        count += 1
        if count > n:
            break
    if count > n:
        break
    print()



