Result

AC

Duration

827ms

Code [DL]

<?php
for(;$c=fgetc(STDIN);)echo($d=$c<'T'?++$d%51-($c>'J')*51:0)<1?'A':$c;

stdin

              T                                   
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
 K                                                

stdout

              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
              A                                   
 AAAAAAAAAAAAAA                                   

stderr

PHP Notice:  Undefined variable: d in /volume/CODE on line 2

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffdc9176020 /* 7 vars */) = 0
13    execve("/usr/bin/php", ["/usr/bin/php", "/volume/CODE"], 0x556393f4dd40 /* 7 vars */) = 0
12    execve("/bin/cat", ["cat", "-"], 0x556393f4dd30 /* 7 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 +++