#include <iostream>
using namespace std;
int main()
{
int a[16][16],i,j,n;
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
if (i==1||i==n) a[i][j]=i+j;
else if(j==1||j==n) a[i][j]=i+j;
else a[i][j]=a[i-1][j-1]+a[i-1][j]+a[i-1][j+1];
cout<<a[i][j]<<" ";
}
cout<<endl;
}
return 0;
}