Result

AC

Duration

711ms

Code [DL]

a,*b,c=open(0)
print(a+a*len(b)+(c.rstrip()+"*"*99)[:a.find("T")+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                            
         K************

stderr

strace