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(eval(input()))

for i in range(n):

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

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(eval(input()))
for i in range(n):
    print((*((i ^ j).bit_length() for j in range(i + 1, n))))

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