import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n=sc.nextInt();
int arr[][]=new int[n][n];
for (int i = 0; i < arr.length; i++) {
arr[i][0]=1;
arr[i][i]=1;
for (int j = 1; j < i; j++) {
arr[i][j]=arr[i-1][j-1]+arr[i-1][j];
}
}
for (int i = 0; i < arr.length; i++) {
for (int j = 0; j <= i; j++) {
if (j==i) {
System.out.print(arr[i][j]);
}else{
System.out.print(arr[i][j]+" ");
}
}
System.out.println();
}
System.out.println( );
}
}
}