# #题解1 # import sys # def encode(s): # encodes = "" # for c in s: # if c.isupper(): # if c == 'Z': # encodes += 'a' # else: # encodes += chr(ord(c.lower()) + 1) # elif c.islower(): # if c == 'z': # encodes += 'A' # else: # encodes += chr(ord(c.upper()) + 1) # elif c.isdecimal(): # if c == '9': # encodes += '0' # else: # encodes += chr(ord(c) + 1) # return encodes # def decode(s): # decodes = "" # for c in s: # if c.isupper(): # if c == 'A': # decodes += 'z' # else: # decodes += chr(ord(c.lower()) - 1) # elif c.islower(): # if c == 'a': # decodes += 'Z' # else: # decodes += chr(ord(c.upper()) - 1) # elif c.isdecimal(): # if c == '0': # decodes += '9' # else: # decodes += chr(ord(c) - 1) # return decodes # while True: # try: # toencodes = input().strip() # print(encode(toencodes)) # todecodes = input().strip() # print(decode(todecodes)) # except: # # print(sys.exc_info()) # break #题解2 intab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ourtab= "bcdefghijklmnopqrstuvwxyzaBCDEFGHIJKLMNOPQRSTUVWXYZA1234567890" encodeTrans = str.maketrans(intab,ourtab) decodeTrans = str.maketrans(ourtab,intab) while True: try: toencodes = input().strip() print(toencodes.translate(encodeTrans)) todecodes = input().strip() print(todecodes.translate(decodeTrans)) except: break