while True: n=map(str,raw_input().strip().split()) if n[0] == '@': break x=n[0] y=int(n[1]) for j in range(1,y+1): if j==1: print ' '*(y-1)+x elif j==y: print x*(2*y-1) else: print ' '*(y-j)+x+' '*(2*j-3)+x print