import std.stdio, std.conv, std.string, std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
void main(string[] args){ if(args.length > 1) if(args[1] == "-debug") DEBUG = 1; solve(); }
void log()(){ writeln(""); } void log(T, A ...)(T t, lazy A a){ if(DEBUG) write(t, " "), log(a); } bool DEBUG = 0; 
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- //

void solve(){
	int n = read.to!int;
	
	foreach(i; 1 .. n + 1){
		int[] ans;
		foreach(j; 1 .. n - i + 1){
			ans ~= f(j) + 1;
		}
		ans.map!(to!string).array.join(" ").writeln;
	}
	
	log([0, 1, 2, 3, 4, 5, 6].map!f);
	
}

int f(int j){
	int res = 0;
	while(j > 0 && j % 2 == 0) res += 1, j /= 2;
	return res;
}


/*

   1/2/3/4/5/6/7/8/9/A/B
1: - 1 2 1 3 1 2 1 4 1 2
2: 1 - 1 2 1 3 1 2 1 4 1
3: 2 1 - 1 2 1 3 1 2 1 4
4: 1 2 1 - 1 2 1 3 1 2 1
5: 3 1 2 1 - 1 2 1 3 1 2
6: 1 3 1 2 1 - 1 2 1 3 1
7: 2 1 3 1 2 1 - 1 2 1 3
8: 1 2 1 3 1 2 1 - 1 2 1
9: 4 1 2 1 3 1 2 1 - 1 2
A: 1 4 1 2 1 3 1 2 1 - 1
B: 2 1 4 1 2 1 3 1 2 1 -

*/
