#include <iostream>
using namespace std;
int n, a[102][102], i, j;
int main ()
{
cin >> n;
for (i = n; i >= 1; i--)
for (j = 1; j <= n; j++) {
if (j == 1) a[i][j] = i;
else if (i == n) a[i][j] = n;
else a[i][j] = a[i+1][j-1] + a[i][j-1];
}
for (i = 1; i <= n; i++) {
for (j = 1; j <= n; j++) cout << a[i][j] << " ";
cout << endl;
}
return 0;
}