Result

WA

Duration

728ms

Code [DL]

a,*b,c=open(0)
i=a.find("T")
x=a*4
j=c.find("K")
print(x+" "*j+"*"*(1+i-j))

stdin

                  T                               
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
     K                                            

stdout

                  T                               
                  T                               
                  T                               
                  T                               
     **************

stderr

strace