num = int(input())
if num>=140:
print("A")
if num <= 139 and num >=120:
print("B")
if num <= 119 and num >=110:
print("C")
if num <= 109 and num >=90:
print("D")
if num <= 89 and num >=80:
print("E")
if num <= 79 and num >=70:
print("F")
if num <= 69:
print("G")