#include<bits/stdc++.h>
using namespace std;
int main(){
    int i,j,n,c=1,a[20][20]={0};
    cin>>n;
    for(i=0;i<n;i++){
        for(j=0;j<n;j++){
            a[j][i]=i+j+1;  
        }
             
    } 
    for(i=0;i<n;i++){
        for(j=0;j<n;j++){
            cout<<setw(3)<<a[i][j];
        }
        cout<<endl;
    }
 
    return 0;
}
/**************************************************************
	Problem: 1192
	User: wangzherongyao
	Language: C++
	Result: Accepted
	Time:11 ms
	Memory:2072 kb
****************************************************************/