#include<stdio.h>
int chars[100][2] = {};//每行要出现的字符编码
int main() {
int line;
char start;
char c, c1;
scanf("%d %c",&line,&start);//输出多少行
for (int i = 0; i < line; i++) {
c ='A'+ (start-'A' + i)%26;
c1 = 'A' + (start - 'A' + 2*line-i-2) % 26;
//左边空格是 0 1 2 3 4
for (int j = 0; j < i; j++)
printf(" ");
printf("%c", c);
//中间空格 4 3 2 1
for (int j = 0; j <(line-i-1)*2-1; j++) {
printf(" ");
}
if (i != line - 1) {
printf("%c", c1);
}
printf("\n");
}
}