#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;

const int N = 500;
int res[N][N];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int n;
	cin >> n;

	for (int b = 0; (1<<b) <= n; ++b) {
		for (int i = 0; i < n; ++i) {
			for (int j = i+1; j < n; ++j) {
				if ((i ^ j) & (1<<b)) {
					if (res[i][j] == 0) res[i][j] = b+1;
				}
			}
		}
	}
	for (int i = 0; i+1 < n; ++i) {
		for (int j = i+1; j < n; ++j) {
			cout << res[i][j] << ' ';
		}
		cout << '\n';
	}
	
}
