n = int(input()) if n >= 90: print("A") elif n >= 70: print("B") elif n >= 60: print("C") else: print("D")