s=input() while s!="@": s=s.split() a=s[0] n=int(s[1]) print(" "*(n-1)+a) i=n-2 while i>=1: print(" "*i+a+" "*((n-i-1)*2-1)+a) i=i-1 if n>1: print(a*(2*n-1)) print() s=input()