#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
//直角三角
int i,j,n,a[50][50]={0};
while(scanf("%d",&n)!=-1)
{ for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{if(j==0||i==j) a[i][j]=1;
else a[i][j]=a[i-1][j]+a[i-1][j-1];
}
}
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++){
printf("%3d ",a[i][j]);
}
printf("\n");
}
}
return 0;
}