def solve(s): if s in('A','C','D','F','G'): return s+'#' else: if s=='B': return 'C' else: return 'F' print(solve(input()))