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

    for(size_t i = 0; i < n; i++)
    {
        a[i] = new int[n];//分配列空间
        for(size_t j = 0; j < n; j++)
        {
            a[i][j] = i + j;//赋值
            cout << a[i][j] << " ";
        }
        cout << endl;
    }
    return 0;
}