Result

WA

Duration

751ms

Code [DL]

a,*b,c=open(0)
i=a.find("T")
d=c.strip()+"*"*i
print(a+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        
K*****************************************

stderr

strace