#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
for(int i = 0; i < n * 2 + 1; ++i)
{
for(int j = 0; j < n * 2 + 1; ++j)
{
int d = abs(i - n) + abs(j - n);
if(d > n) cout << " ";
else cout << n - d << " ";
}
cout << endl;
}
return 0;
}