#include<stdio.h>
int main ()
{
int a[105][105];
int i,j,n;
while (~scanf ("%d",&n))
{
a[1][1]=1;
for (i=2;i<=n+1;i++)
a[i][1]=a[i-1][1]+i-1;
for (i=1;i<=n+1;i++)
for (j=2;j<=n+1-i;j++)
{
a[i][j]=a[i][j-1]+(i-1+j);
}
for (i=1;i<=n+1;i++)
{
for (j=1;j<=n+1-i;j++)
printf ("%d ",a[i][j]);
printf ("\n");
}
}
return 0;
}