#include<bits/stdc++.h>
using namespace std;
class yanghui
{
public:
int n,i,j;
void output(int n){
int c[n][n];
for(i=0;i<n;i++){
c[i][0]=1;
c[i][i]=1;
for(j=1;j<i;j++){
c[i][j]=c[i-1][j-1]+c[i-1][j];
}
}
for(i=0;i<n;i++){
for(j=0;j<=i;j++){
cout<<c[i][j];
cout<<" ";
}
cout<<"\n";
}
}
};
int main(){
yanghui p;
cin>>p.n;
p.output(p.n);
}