#include<iostream>
#include<string>
using namespace std;
int main()
{
int i,j,n;
int a[30][30];
cin>>n;
for(i=0;i<=n-1;i++)
{
for(j=0;j<=i;j++)
{
if(j==0)
{
a[i][j]=1;
cout<<a[i][j]<<" ";
}
if(j>0&&j<i)
{
a[i][j]=a[i-1][j-1]+a[i-1][j];
cout<<a[i][j]<<" ";
}
if(i!=0 && j==i)
{
a[i][j]=1;
cout<<a[i][j]<<" ";
cout<<"\n";
}
if(i==0)
{
cout<<"\n";
}
}
}
}