var s,t:string(999);i:comp;begin read(s);repeat readln(t);for i:=1to length(t)do s[i]:=chr(ord(s[i])+pos(t[i],' +')-1)until eof;write(s)end.