include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
int main()
{
int a[100][100];
int n,x,y,z;
while(~scanf(“%d”,&n)&&n)
{
x=0;y=n-1;z=1;
memset(a,0,sizeof(a));
for(int k=0;k<(n+1)/2;k)
{
for(int i=0;i<n;i)
for(int j=0;j<n;j)
{
if(a[i][j]==0&&(i==x||i==y||j==x||j==y))
a[i][j]=z;
}
x;y–;z;
}
for(int i=0;i<n;i)
{
for(int j=0;j<n;j++)
printf(“%d “,a[i][j]);
printf(“\n”);
}
printf(“\n”);
}
return 0;
}