by@k_hanazuki
AC
773ms
$_=`dd`;/T/;s/\n.{$-[0]}\K/T/g;s/K */K x length$&/ge;print
T K
T T T T T T T T T T T T T T KKKKKKKKKKKKT
1+1 records in 1+1 records out