#include<bits/stdc++.h>
using namespace std;
int main(){
    int a[15][15]={0},i,j,n,x;
    cin>>n;
    x=n*n;
    for(i=n;i>0;i--){
        for(j=n;j>0;j--){
            a[i][j]=x;
            x--;
        } 
    } 
    for(i=n;i>0;i--){
        for(j=1;j<=n;j++){
            cout<<setw(3)<<a[i][j];
        } 
        cout<<endl;
    } 
}
/**************************************************************
	Problem: 1191
	User: linmiaoling
	Language: C++
	Result: Wrong Answer
****************************************************************/