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

/**************************************************************
	Problem: 1205
	User: lcy
	Language: C++
	Result: Accepted
	Time:23 ms
	Memory:2072 kb
****************************************************************/