Result

AC

Duration

5393ms

Code [DL]

fun main(){var s=readLine()!!
var d=0
do{d=readLine()!!.indexOf('K')
println(s)}while(d<0)
print(" ".repeat(d)+"K".repeat(s.indexOf('T')-d+1))}

stdin

                T                                 
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
     K                                            

stdout

                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
                T                                 
     KKKKKKKKKKKK

stderr

OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.openapi.util.JDOMUtil$2 to constructor com.sun.xml.internal.stream.XMLInputFactoryImpl()
WARNING: Please consider reporting this to the maintainers of com.intellij.openapi.util.JDOMUtil$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
/tmp/code.kt:2:7: warning: variable 'd' initializer is redundant
var d=0
      ^

strace