var
a,b:ansistring;
c:longint;
begin
assign(input,'vigenere.in');
assign(output,'vigenere.out');
reset(input);
rewrite(output);
readln(a);
readln(b);
while length(a)<length(b) do a:=a+a;
for c := 1 to length(b) do write(chr((ord(b[c]) and 31-ord(a[c]) and 31+ord(ord(b[c]) and 31-ord(a[c]) and 31<0)*26)mod 26+65+(ord(b[c]) shr 5-2)*32));
close(input);
close(output);
end.