#include <bits/stdc++.h>
using namespace std;
int main(){
int n,i,j,s[99];
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: 1197
User: fzy001
Language: C++
Result: Wrong Answer
****************************************************************/