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