Result

AC

Duration

809ms

Code [DL]

a=require("fs").readFileSync(0);for(i=51;i<a.length;i++)a[i]|=a[i-51];i-=51;while(a[++i]!=116)a[i]|=a[i-1];console.log(""+a);

stdin

                   T                              
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
         K                                        

stdout

                   T                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
                   t                              
         kkkkkkkkkkt                              

stderr

strace