#include<stdio.h>
int main(void)
{
int n,a,i,j,m,b,c,d;
scanf("%d",&n);
m=n;
a=1;j=2;c=0;
while(m--)
{
b=a+c;
a=b;
d=j;
for(i=0;i<n;++i)
{
if(i==0)
printf("%d",b);
else
printf(" %d",b);
b=b+d;
d=d+1;
}
printf("\n");
n=n-1;
c++;
j++;
}
return 0;
}