#include<stdio.h>
void main()
{
int n;
char a,b ;
int firstcase=1;
while(scanf("%d %c %c",&n,&a,&b)==3)
{
char graph[82][82];
int x,y,i,j,k;
char c;
if(firstcase==1)
{
firstcase=0;
}
else printf("\n");
for(i=1,j=1;j<=n;i++,j+=2)
{
x=n/2+1;y=x;
x-=i-1;y=x;
c=(i%2==1?a:b);
for(k=1;k<=j;k++)
{
graph[y][x+k-1]=c;
graph[y+j-1][x+k-1]=c;
graph[y+k-1][x]=c;
graph[y+k-1][x+j-1]=c;
}
}
if(n!=1)
{
graph[n][1]=' ';
graph[1][n]=' ';
graph[n][n]=' ';
graph[1][1]=' ';
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
printf("%c",graph[i][j]);
printf("\n");
}
}
}
注意输入格式