letters = 'abcdefghijklmnopqrstuvwxyz'
nums = '0123456789'

def encode(s):
    res = ''
    for c in s:
        if c.isalpha():
            if c.isupper():
                i = letters.index(c.lower())
                res += letters[(i+1) % 26]
            else:
                i = letters.index(c)
                res += letters[(i+1) % 26].upper()
        elif c.isdigit():
            i = nums.index(c)
            res += nums[(i+1) % 10]
    return res

def decode(s):
    res = ''
    for c in s:
        if c.isalpha():
            if c.isupper():
                i = letters.index(c.lower())
                res += letters[i-1]
            else:
                i = letters.index(c)
                res += letters[i-1].upper()
        elif c.isdigit():
            i = nums.index(c)
            res += nums[i-1]
    return res
        
while True:
    try:
        str1, str2 = input(), input() # str1->明文 str2->密文
        print(encode(str1)) # 加密
        print(decode(str2)) # 解密
    except:
        break