#include<bits/stdc++.h> //setw
using namespace std;
int main(){
int i,n,j,a[10][10];
cin>>n;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
if(i>j){
cout<<setw(3)<<n-j;
}else{
cout<<setw(3)<<n-i;
}
}
cout<<endl;
}
return 0;
}
/**************************************************************
Problem: 1198
User: zzz
Language: C++
Result: Accepted
Time:8 ms
Memory:2072 kb
****************************************************************/