Result

AC

Duration

1333ms

Code [DL]

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

stdin

              T                                   
                                                  
                                                  
                                                  
                                                  
     K                                            

stdout

              T                                   
              T                                   
              T                                   
              T                                   
              T                                   
     K@@@@@@@@@

stderr

strace