# include "stdio.h"
main()
{
int i,j,k,n,buf[100],tmp[100],m;
scanf("%d",&m);
for(i=0; i<=m; i++)
{
for(n=i; n<=m; n++) printf(" ");
if(i==0) printf("%3d\n",1);
else
{
for(j=1; j<=i+1; j++)
{
if(j==1||j==i+1)
{
printf("%3d ",1);
tmp[j-1]=1;
}
else
{
tmp[j-1]=buf[j-2]+buf[j-1];
printf("%3d ",tmp[j-1]);
}
}
printf("\n");
for(k=0; k<=m; k++)
buf[k]=tmp[k];
}
}
}