s=input() if s not in 'ABCDEFG': raise Exception if s in 'ACDFG': print(s+'#') elif s=='B': print('C') else: print('F')