Result

AC

Duration

728ms

Code [DL]

d=io.read
f=d(51)h=d'*a'p,c=h:gsub(' *\n','')print(f:rep(c)..p..f.rep(0,f:find"T"-p:find"K"))

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                     
                       K00000

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fffbb0aefa0 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x55b5311e3d30 /* 7 vars */ <unfinished ...>
12    execve("/usr/bin/lua5.3", ["/usr/bin/lua5.3", "/volume/CODE"], 0x55b5311e3d40 /* 7 vars */ <unfinished ...>
11    <... execve resumed> )            = 0
12    <... execve resumed> )            = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
12    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
10    +++ exited with 0 +++