public class Pascal2 {
    public static void main(String[] args) {
	int N = Integer.parseInt(args[0]);

	int[] vrstica = { 1 };

	for (int j = 0; j < N; j = j + 1) {

	    // izpisemo vrstica
	    for (int k = 0; k < vrstica.length; k = k + 1) {
		System.out.print(vrstica[k] + " ");
	    }
	    System.out.println();

	    // izracunamo novo vrstico

	    int[] nova = new int[vrstica.length + 1];

	    nova[0] = 1;

	    for (int i = 1; i < nova.length - 1; i = i + 1) {
		nova[i] = vrstica[i-1] + vrstica[i];
	    }

	    nova[nova.length - 1] = 1;

	    // nastavimo vrstica na novo vrstico

	    vrstica = nova;
	}
    }
}
