Result

WA

Duration

883ms

Code [DL]

a,*b,c=open(0)
i=a.find("T")
d=c.rstrip()+"*"*i
print(a*len(b)+d[:i+1])

stdin

                 T                                
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
        K                                         

stdout

                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
                 T                                
        K*********

stderr

strace