#include<bits/stdc++.h>
using namespace std;
int main()
{
 int n;
    cin>>n;
    for(int i=0;i<n;i++){
        for (int j=0;j<n;j++){
            int x;
            if (j<n-i){
            x=n-j;
            } else{
            x=i+1;
            }
            cout<<setw(3)<<x;
        }
        cout<<endl;
    }
 	return 0;
}








































/**************************************************************
	Problem: 1203
	User: sf751616
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/