import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;

void main()
{
    auto N = readln.chomp.to!int;
    auto T = new int[][](N, N);
    
    int x = 1;
    foreach (i; 0..N-1) {
        T[0][i+1] = i%2 == 0 ? 1 : ++x;
    }
    foreach (i; 1..N) {
        foreach (j; i+1..N) {
            T[i][j] = T[i-1][j-1];
        }
    }

    foreach (i; 0..N-1) {
        writeln(T[i][i+1..$].to!(string[]).join(" "));
    }
}