#include <bits/stdc++.h>
 
using namespace std;
 
#define debug(a) cerr << #a << ": " << a << endl
 
typedef long long ll;
typedef pair<int, int> ii;
 
#define x first
#define y second
 
const int N = 510;

int n;

int main() {
	#ifdef LOCAL
	freopen("in", "r", stdin);
	freopen("out", "w", stdout);
	#endif
 
	cin >> n;

	for (int i = 1; i <= n - 1; i++) {
		for (int j = i + 1; j <= n; j++) {
			int k;
			for (k = 0; k < 10; k++) {
				if ((i & 1 << k) != (j & 1 << k)) break;
			}

			printf("%d ", k + 1);
		}
		
		printf("\n");
	}
 
	return 0;
}