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

    }
    for(int i=0;i<n;i++)
    {
        for(int j = 0;j <n;j++)
        {
            arr[i][j] = i+j;
        }
    }
    for(int i=0;i<n;i++)
    {
        for(int j = 0;j <n;j++)
        {
           cout<<arr[i][j]<<" ";
        }
        cout<<endl;
    }
    for(int i =0;i<n;i++)
    {
        delete[]arr[i];

    }
    delete []arr;
    return 0;
}