var s1,s2:string;PRocedure try(s1,s2:string);var i,s:longint;begin if s2<>'' then begin i:=length(s2); s:=pos(s2[i],s1); write(s2[i]); try(copy(s1,1,s-1),copy(s2,1,s-1)); try(copy(s1,s+1,i-s),copy(s2,s,i-s)); end;end;begin readln(s1); readln(s2); try(s1,s2);end.