by@drafear
WA
698ms
a,*b=open(0) print(a*len(b),(b[-1].rstrip()+"*"*99)[:a.find("T")])
T K
T T T T T T T T T T T T T T T T T K******************************