var i:word;a,b:string(999);begin readln(a);repeat readln(b);for i:=1to length(a)do a[i]:=chr(ord(a[i])+pos(b[i]," +")-1)until EOF;write(a)end.