import sys

import heapq

from operator import itemgetter

from collections import deque, defaultdict, Counter

from bisect import bisect_left, bisect_right

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 7)

MOD = 10**9 + 7



def sol():

    N = int(input())



    for i in range(1, N):

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

            digit = 0

            while (i & (1 << digit)) == (j & (1 << digit)):

                digit += 1

            print('{} '.format(digit + 1), end='')

        print('')



sol()

N = int(eval(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))

import sys
import heapq
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7


def sol():
    N = int(input())
    for i in range(1, N):
        for j in range(i + 1, N + 1):
            digit = 0
            while (i & (1 << digit)) == (j & (1 << digit)):
                digit += 1
            print("{} ".format(digit + 1), end="")
        print("")


sol()

N = int(eval(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))

-import sys -import heapq -from operator import itemgetter -from collections import deque, defaultdict, Counter -from bisect import bisect_left, bisect_right - -input = sys.stdin.readline -sys.setrecursionlimit(10**7) -MOD = 10**9 + 7 - - -def sol(): -    N = int(input()) -    for i in range(1, N): -        for j in range(i + 1, N + 1): -            digit = 0 -            while (i & (1 << digit)) == (j & (1 << digit)): -                digit += 1 -            print("{} ".format(digit + 1), end="") -        print("") - - -sol() +N = int(eval(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))