s=io.read()for t in io.lines()do r=""for i=1,#t do r=r..t.char(s:sub(i):byte()-t:sub(i):byte()%6+2)end s=r end print(s)