marks=int(input())
if marks >90:
    print("A GRADE")
elif marks>=80 or marks==90:
    print("B GRADE")
elif marks>=70 or marks==80:
    print("C GRADE")
elif marks>=60 or marks==70:
    print("D GRADE")
elif marks<60:
    print("FAIL")
