AtCoder's head office consists of N rooms numbered 1 to N. For any two rooms, there is a direct passage connecting these rooms.  For security reasons, Takahashi the president asked you to set a **level** for every passage, which is a positive integer and must satisfy the following condition:    * For each room i\ (1 \leq i \leq N), if we leave Room i, pass through some passages whose levels are all equal and get back to Room i, the number of times we pass through a passage is always even.  Your task is to set levels to the passages so that the highest level of a passage is minimized.
N = int(input())

for i in range(1, N):
    print(' '.join(str(i) * (N - i)))

N = int(input())

for i in range(N - 1):
    row = []
    for j in range(i + 1, N):
        d = 0
        while (i & (1 << d)) == (j & (1 << d)):
            d += 1
        row.append(d + 1)
    print(*row)
