#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int a[17][17]={0};
    int k = 1;
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<n-i;j++)
        {
            if(i==0)
            {
                a[j][j] = k;
                k++;
            }
            else
            {
                a[j][j+i] = a[j][j+i-1]+a[j+1][j+i];
            }
        }
    }
    for(int i=0;i<n;i++)
    {
        for(int j = 0;j<n;j++)
        {
            if(a[i][j] == 0)
            {
                cout<<setw(5)<<" ";
            }
            else
            {
                cout<<setw(5)<<a[i][j];
            }
        }
        cout<<endl;
    }
}
/**************************************************************
	Problem: 1205
	User: wuyichen
	Language: C++
	Result: Accepted
	Time:9 ms
	Memory:2072 kb
****************************************************************/