N = int(eval(input()))



for i in range(N):

    A = []

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

        d = i ^ j

        A.append((d & -d).bit_length())

    print((*A))

N = int(eval(input()))



for i in range(N):

    A = []

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

        A.append((i ^ j).bit_length())

    print((*A))

N = int(eval(input()))
for i in range(N):
    A = []
    for j in range(i + 1, N):
        d = i ^ j
        A.append((d & -d).bit_length())
    print((*A))

N = int(eval(input()))
for i in range(N):
    A = []
    for j in range(i + 1, N):
        A.append((i ^ j).bit_length())
    print((*A))

-        d = i ^ j -        A.append((d & -d).bit_length()) +        A.append((i ^ j).bit_length())