#include<stdio.h>
int n;
void draw(int n)
{
int i,j;
for (i=1-(n>>1); i<=n; i++)
if (i>0)
{
for (j=0; j<i; j++) printf(" ");
for (j=1; j<=2*(n-i)+1; j++)
if (j==1||j==2*(n-i)+1) printf(" *");
else printf(" ");
printf("\n");
}
else if (i==0)
{
printf(" *");
for (j=1; j<n; j++) printf(" ");
printf(" *");
for (j=1; j<n; j++) printf(" ");
printf(" *\n");
}
else
{
for (j=i; j<0; j++) printf(" ");
for (j=1; j<=n+2*i+1; j++)
if (i==1-(n>>1)) printf(" *");
else if (j==1||j==n+2*i+1) printf(" *");
else printf(" ");
for (j=1; j<=-1-2*i; j++) printf(" ");
for (j=1; j<=n+2*i+1; j++)
if (i==1-(n>>1)) printf(" *");
else if (j==1||j==n+2*i+1) printf(" *");
else printf(" ");
printf("\n");
}
}
int main()
{
printf("Please input the size (n>=4):");
scanf("%d",&n);
draw(n);
return 0;
}