Result

AC

Duration

758ms

Code [DL]

a,*b,c=*$<;puts a,b.map{a},(c.rstrip+?a*99)[0..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           
                     Kaaaaaaaaaaaaaaaaa

stderr

strace