#include <iostream>
#include <string>
using namespace std;

int main()
{
    int n;
    while(cin >> n){
        int k = 1;
        for(int i = 1; i <= n; i++){
            cout << k << ' ';
            int temp = k;
            for(int j = i+1; j <= n; j++){
                temp += j;
                cout << temp << ' ';
            }
            k += i;
            cout<<endl;
        }
        
        
    }
    
    
    return 0;
}