var s1,s2,c1,c2:string;
i:integer;
Begin
read(s1,c1,c2);
for i:= 1 to length(s1) do begin
s2:=s2 + s1[i];
if s1[i]=c1 then s2:=s2+c2;
end;
writeln(s2);
End.
var s1,s2,c1,c2:string;
i:integer;
Begin
read(s1,c1,c2);
for i:= 1 to length(s1) do begin
s2:=s2 + s1[i];
if s1[i]=c1 then s2:=s2+c2;
end;
writeln(s2);
End.