#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int n; cin >> n;
for(int i = 0; i < n; i++) {
for(int j = i * n + 1; j <= n * (i + 1); j++) {
printf("%02d", j);
}
cout << endl << endl;
}
int k = 1;
for(int i = 0; i < n; i++) {
for(int j = 0; j < n - i - 1; j++) {
cout << " ";
}
for(int j = 0; j < i + 1; j++) {
printf("%02d", k++);
}
cout << endl << endl;
}
return 0;
}