a,*b,c=open(0) print(a+a*len(b),f'{c.rstrip():*<{a.find("T")}}')