#include <iostream>
using namespace std;
int n,i,j,k,l;
int main()
{
cin >> n;
k=n-1;
l=1;
for(i=1;i<=n;i++)
{
for(j=1;j<=k;j++)
cout << " ";
for(j=1;j<=l;j++)
cout << i;
cout << endl;
k--;
l+=2;
}
k++;
l-=2;
for(i=n-1;i>=1;i--)
{
k++;
l-=2;
for(j=1;j<=k;j++)
cout << " ";
for(j=1;j<=l;j++)
cout << i;
cout << endl;
}
return 0;
}