Result

AC

Duration

853ms

Code [DL]

a,*b,c=*$<;puts a,b.map{a};puts' '*(g=c=~/K/)+?a*(1-g-=a=~/T/)

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                               
                  T                               
                  T                               
                  T                               
                  T                               
                  T                               
         aaaaaaaaaa

stderr

strace