#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
while (cin >> n) {
vector<vector<int>> mat(n, vector<int>(n,1));
int cnt = 2;
for(int i = 1; i < n; i++){
mat[0][i] = mat[0][i - 1] + cnt++;
}
for(int j = 0; j < n; j++){
int incre = j + 1;
for(int i = 1; i < n; i++){
mat[i][j] = mat[i - 1][j] + incre++;
if(i == n - j - 1) break;
}
}
for(int i = 0; i < n; i++){
for(int j = 0; j < n - i; j++){
cout << mat[i][j] << " ";
}
cout << endl;
}
}
return 0;
}
// 64 位输出请用 printf("%lld")