Result

AC

Duration

1581ms

Code [DL]

%%!
f(S)->case string:chr(io:get_line(S),$K)of
0->f(S);J->io:format("~*cA~*c",[J-1,$ ,string:chr(S,$T)-J,$*])end.
main(A)->f(io:get_line(A)).

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                              
               A****

stderr

strace