Result

AC

Duration

675ms

Code [DL]

print(t=gets())
while gets()
print((k=$_.index("K"))&&" "*k+"a"*(t.index("T")-k+1)||t)
end

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                                       
    aaaaaaa

stderr

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffd9822b7e0 /* 8 vars */) = 0
12    execve("/bin/cat", ["cat", "-"], 0x5594adfccc10 /* 8 vars */) = 0
13    execve("/bin/ruby", ["/bin/ruby", "/volume/CODE"], 0x5594adfccc28 /* 8 vars */) = 0
12    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
13    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
11    +++ exited with 0 +++