by@kcz146
AC
1126ms
import std.stdio;void main(){int b=0;char[] c,d,e;for(c=readln.dup;e=readln.dup,e;d=e)write(c);for(;d[++b]-75;){};for(;c[b]-84;)++c[b++];write(c);}
T K
T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T !!!!!!!!!T