#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    // write your code here......
    int ** re = new  int* [n];

    for(int i=0;i<n;++i)
    {
        re[i]=new int [n];
        for (int j=0;j<n;++j)
        {
            re[i][j]=i+j;
            cout<<re[i][j]<<" ";
        }
        cout<<"\n";
    }

    return 0;
}