int main() {
    int n;
    scanf("%d", &n);
    int val[n][n];
    for (int i = 0; i < n; i++) {
        for (int j = 0; j <= i; j++) {
            if (j == 0 || j == i) val[i][j] = 1;
            else val[i][j] = val[i - 1][j - 1] + val[i - 1][j];
            printf("%5d", val[i][j]);
        }
        printf("\n");
    }
    return 0;
}