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

/**************************************************************
	Problem: 1275
	User: wtq001
	Language: C++
	Result: Accepted
	Time:10 ms
	Memory:2072 kb
****************************************************************/