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; 0 .. n){
		int[] ans;
		foreach(j; 0 .. n - i){
			if(j % 2 == 0) ans ~= 1;
			else ans ~= (j / 2) + 2;
		}
		ans.map!(to!string).array.join(" ").writeln;
	}
}


/*

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

*/
