by@k_hanazuki
AC
1333ms
set S string read s set t ($S length ($S trim -r $s)) while read p echo $s set k ($S trim -r $p) [ $k ]&&echo $k($S repeat -n(math $t-($S length $k)) @) end
T K
T T T T T K@@@@@@@@@