#include<stdio.h>
#include<math.h>
int main(void)
{
	int i,j,n;
	scanf("%d",&n);
	for(i=1-n;i<=n-1;i++)
	{	
		for(j=0;j<fabs(i);j++)
		{	
			printf(" ");
		}
			printf("%d",n-fabs(i));
		for(j=2*(n-fabs(i)-1)-1;j>0;j--)
		{
			printf(" ");
		}
			if(fabs(i)!=n-1)
			printf("%d",n-fabs(i));

		printf("\n");
	}
	return 0;
}