var
a,b,l,c1,c2,s,i,j:longint;
m,k,c:ansistring;
begin
assign(input,'vigenere.in');
reset(input);
assign(output,'vigenere.out');
rewrite(output);
readln(k);
readln(c);
l:=length(k);
for a:=1 to length(c) do
begin
inc(b);
if b=l+1 then b:=1;
if (c[a]>='a')and(c[a]<='z') then c1:=96 else c1:=64;
if (k[b]>='a')and(k[b]<='z') then c2:=96 else c2:=64;
i:=ord(c[a])-c1;
j:=ord(k[b])-c2;
if i>j then s:=i-j+1 else s:=26-j+i+1;
if s mod 26=0 then m:=m+chr(c1+26) else m:=m+chr(c1+s mod 26);
end;
writeln(m);
close(input);close(output);
end.