n = int(input())

for i in range(n):

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

        print((i ^ j & -(i ^ j)).bit_length(), end=' ')

    print()

n = int(eval(input()))

for i in range(n):

    print((*((i ^ j & -(i ^ j)).bit_length() for j in range(i + 1, n))))

n = int(input())
for i in range(n):
    for j in range(i + 1, n):
        print((i ^ j & -(i ^ j)).bit_length(), end=" ")
    print()

n = int(eval(input()))
for i in range(n):
    print((*((i ^ j & -(i ^ j)).bit_length() for j in range(i + 1, n))))

-n = int(input()) +n = int(eval(input())) -    for j in range(i + 1, n): -        print((i ^ j & -(i ^ j)).bit_length(), end=" ") -    print() +    print((*((i ^ j & -(i ^ j)).bit_length() for j in range(i + 1, n))))