by@drafear
AC
689ms
a,*b,c=open(0) i=a.find("T") x=a for l in b:x+=a j=c.find("K") print(x+" "*j+"K"+"*"*(i-j))
T K
T T T T T T T T T K***************