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

/**************************************************************
	Problem: 1197
	User: hongguangxi
	Language: C++
	Result: Accepted
	Time:11 ms
	Memory:2072 kb
****************************************************************/