import java.util.Scanner;
public class PascalTriangle {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int MAX = scanner.nextInt();
long odds[][] = new long[MAX][];
for (int n = 0; n < MAX; n++) {
odds[n] = new long[n + 1];
}
/*
* 用上一行递推计算
* 每个数字等于上一行的左右两个数字之和。
* 可用此性质写出整个杨辉三角。即第n+1行的第i个数等于第n行的第i-1个数和第i个数之和
*/
for (int n = 0; n < odds.length; n++) {
for (int m = 0; m < odds[n].length; m++) {
if (m == 0 || m == n) {
odds[n][m] = 1;
}else {
odds[n][m] = odds[n - 1][m - 1] + odds[n - 1][m];
}
}
}
// 输出整个三角形
for (int n = 0; n < odds.length; n++) {
for (int m = 0; m < odds[n].length; m++) {
System.out.print(odds[n][m] + " ");
}
System.out.println();
}
}
}