import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] v = new int[n][n];
        for(int i = 0; i < n; ++i){
            v[i][i] = 1;
            v[i][0] = 1;
        }
        for(int i = 1; i < n; ++i){
            for(int j = 1; j < n; ++j){
                v[i][j] = v[i - 1][j - 1] + v[i - 1][j];
            }
        }
        for(int i = 0; i < n; ++i){
            for(int j = 0; j <= i; ++j){
                System.out.printf("%5d", v[i][j]);
            }
            System.out.println();
        }
    }
}