Result

AC

Duration

845ms

Code [DL]

1h
1!{$!g
${x
:1
/T /{s/T /T/;x;s/K /K/;x}
t1
:2
/ T/{x;/K /{x;s/ T/T/;x;s/K /KK/};x}
t2
x}}

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                       
KKKKKKKKKKKKKKKKKKKKKKKKKKK

stderr

strace