#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main()
{
int n;
char ch;
int flag = 0;
while(scanf("%c",&ch),ch!='@')
{
scanf("%d",&n);
getchar();//取走输入n后 按的回车
if(flag) printf("
");
flag = 1;
for(int i=0;i<n;i++)
{
for(int j=0;j<n+i;j++)
{
if(j==n-1-i||j==n-1+i||i==n-1)
printf("%c",ch);
else printf(" ");
}
printf("
");
}
}
return 0;
}