import sys readline=sys.stdin.readline S=readline().rstrip() if S in "ACDFG": ans=S+"#" else: ans=chr((ord(S)+1-65)%7+65) print(ans)