#include
int main()
{int n,i,k=0,i1,j1,j,a[20][20]={0};
scanf("%d",&n);
if(!(n%2))return 0;
i=0;j=n/2;
for(int i1=0;i1 {for(j1=0;j1 {a[i][j]=++k; if(j1==n-1)break; if(--i<0)i=n-1; if(++j==n)j=0; } i++; } for(int i=0;i<=n;i++) {for(j=0;j {printf("%4d",a[i][j]); if(i {a[i][n]+=a[i][j]; a[n][j]+=a[i][j]; } }