by@kcz146
AC
855ms
$_,*b,c=*$<;c[?K]*=99;s$_*-~b.sz,c[0..~/T/]
T K
T T T T T T T T T T T KKKK
<internal:golf_prelude>:4: warning: redefining Object#method_missing may cause infinite loop