Problem:
 Score : 100 points    Problem Statement A programming competition site AtCode regularly holds programming contests.  The next contest on AtCode is called ABC, which is rated for contestants with ratings less than 1200 .  The contest after the ABC is called ARC, which is rated for contestants with ratings less than 2800 .  The contest after the ARC is called AGC, which is rated for all contestants.  Takahashi's rating on AtCode is R . What is the next contest rated for him?      Constraints  0 ≤ R ≤ 4208  R is an integer.         Input Input is given from Standard Input in the following format:  R       Output Print the name of the next contest rated for Takahashi ( ABC , ARC or AGC ).        Sample Input 1 1199      Sample Output 1 ABC  1199 is less than 1200 , so ABC will be rated.       Sample Input 2 1200      Sample Output 2 ARC  1200 is not less than 1200 and ABC will be unrated, but it is less than 2800 and ARC will be rated.       Sample Input 3 4208      Sample Output 3 AGC

Solution (Python):
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
N=int(input())
if N<1200:
    print("ABC")
elif N<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
a=int(input())
if a<1200:
  print('ABC')
elif a<2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
print("A"+"BRG"[(int(input())+400)//1600]+"C")

Solution (Python):
r = int(input())
print("ABC" if r <1200 else "ARC" if r < 2800 else "AGC")

Solution (Python):
r = int(input())

if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):

R = int(input())

if R < 1200:
    print('ABC')
elif 1200 <= R <2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())
print('ABC' if r < 1200 else 'ARC' if r < 2800 else 'AGC')

Solution (Python):
rating = int(input())
print("ABC" if rating < 1200 else "ARC" if rating < 2800 else "AGC")

Solution (Python):
R = int(input())
if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r=int(input())
print('ABC' if r<1200 else 'ARC' if 1200<=r<2800 else 'AGC')

Solution (Python):
r = int(input())
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else :
  print("AGC")

Solution (Python):
a = int(input())
if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
print("ABC" if 1200 > r else "ARC" if 2800 > r else "AGC")

Solution (Python):
R = int(input())
if R<1200:
    print('ABC')
elif R<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())
if r >= 2800:
  print("AGC")
elif r >= 1200:
  print("ARC")
else:
  print("ABC")

Solution (Python):
r=int(input())
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R=int(input())
if R<1200:
      print('ABC')
if R>=1200 and R<2800 :
      print('ARC')
if R>=2800 and R<=4208 :
      print('AGC')

Solution (Python):
s=int(input())
if s<1200:
  print('ABC')
elif 1200<=s<2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r = int(input())
if r <1200:
    print ("ABC")
elif r<2800:
    print ("ARC")
elif r<=4208:
    print ("AGC")

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r=int(input());print('ABC' if r<1200 else 'ARC' if r<2800 else 'AGC')

Solution (Python):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
n=int(input())
if n<1200:print("ABC")
elif 1200<=n<2800:print("ARC")
else:print("AGC")

Solution (Python):
n = int(input())
if n < 1200:
    print("ABC")
elif n < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
a = int(input())
if a < 1200:
  print("ABC")
elif a < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r = int(input())
if r<1200 :
    print("ABC")
elif 1200<=r<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R=int(input())
print('ABC' if R<1200 else 'ARC' if 1199<R<2800 else 'AGC')

Solution (Python):
R = int(input())
if R < 1200:
    print('ABC')
    exit()
elif R < 2800:
    print('ARC')
    exit()
else:
    print('AGC')

Solution (Python):
r=int(input())
if r<1200:
  print("ABC")
elif r<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
print(['ABC','ARC','AGC'][int(input())//100+4>>4])

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')

if R >= 1200 and R < 2800:
    print('ARC')

if R >= 2800:
    print('AGC')

Solution (Python):
R = int(input())
print('ABC' if R < 1200 else 'ARC' if 1200 <= R < 2800 else 'AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif 1200 <= R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif 1200 <= r < 2800:
    print('ARC')
else:
  print('AGC')

Solution (Python):
r = int(input())
print('ABC' if r<1200 else 'ARC' if 1200<=r<2800 else 'AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())

if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
a = int(input())
print("ABC" if a <1200 else "ARC" if a <2800 else "AGC")

Solution (Python):
r = int(input())
if r < 1200:
     print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
	print("ABC")
elif R < 2800:
	print("ARC")
else: print("AGC")

Solution (Python):
r = int(input())
print("ABC" if r < 1200 else "ARC" if r < 2800 else "AGC")

Solution (Python):
r = int(input())
print('AGC' if r>=2800 else 'ARC' if r>=1200 else 'ABC')

Solution (Python):
r = int(input())
print('ABC' if r<1200 else 'ARC' if r<2800 else 'AGC')

Solution (Python):
r = int(input())
print('ABC' if r<1200 else 'ARC' if r<2800 else 'AGC')

Solution (Python):
n=int(input())
if n>=2800:print("AGC")
elif n>=1200:print("ARC")
else:print("ABC")

Solution (Python):
r=int(input())
if r<1200:
    print('ABC')
elif r<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
num = int(input())
if num<1200:
  print("ABC")
elif 1200<=num<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r = int(input())
if 0 <= r < 1200:
    print('ABC')
elif 1200 <= r < 2800:
    print('ARC')
elif 2800 <= r <= 4208:
    print('AGC')
else:
    print('hoge!')

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

r = ni()
if r < 1200:
    print("ABC")
elif 1200 <= r < 2800:
    print("ARC")
else:
    print('AGC')

Solution (Python):
print(["ABC","ARC","AGC"][int(input())//100+4>>4])

Solution (Python):
a=int(input())
if a<1200:
  print("ABC")
elif 2800<=a:
  print("AGC")
else:
  print("ARC")

Solution (Python):
r = int(input())
print("ABC" if r<1200 else "ARC" if 1200<=r<2800 else "AGC")

Solution (Python):
r = int(input())
if r < 1200:
    s = 'ABC'
elif r < 2800:
    s = 'ARC'
else:
    s = 'AGC'
print(s)

Solution (Python):
r=int(input())
print('ABC' if r<1200 else 'ARC' if r<2800 else 'AGC')

Solution (Python):
n=int(input())

if n<1200:
  print('ABC')
elif 1200<=n<2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):


r = int(input())

if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
A=int(input())
if(A < 1200):
    print("ABC")
elif(A < 2800):
    print("ARC")
else:
    print("AGC")

Solution (Python):
N = int(input())
print('ABC' if N <1200 else 'ARC' if N <2800  else 'AGC')

Solution (Python):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())

if R<1200:
  print("ABC")
elif R<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R=int(input())
if R<1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R = int(input())
print("ABC") if R < 1200 else print("ARC") if R < 2800 else print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r = int(input())
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r=int(input())
if 1200>r:
    print("ABC")
elif 2800>r and r>=1200:
    print("ARC")
elif r>=2800:
    print("AGC")

Solution (Python):

r = int(input())

if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r = int(input())
print('ABC' if r < 1200 else 'ARC' if r < 2800 else 'AGC')

Solution (Python):
N = int(input())
print("ABC" if N<1200 else "ARC" if N<2800 else "AGC")

Solution (Python):
r=int(input())
print('ABC' if r<1200 else 'ARC' if r<2800 else 'AGC')

Solution (Python):
R = int(input())
print("ABC" if R < 1200 else "ARC" if R < 2800 else "AGC")

Solution (Python):
R = int(input())

if R<1200:
  print("ABC")
elif R<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r=int(input());print(["AGC","ARC","ABC"][sum(map(lambda x:r<x,[1200,2800]))])

Solution (Python):

a = int(input())

if a < 1200:
  print('ABC')
elif a < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r = int(input())
if r >= 2800 :
  print('AGC')
elif r >= 1200:
  print('ARC')
else:
  print('ABC')

Solution (Python):
r = int(input())
ans = ""

if r < 1200:
    ans = "ABC"

elif r >=1200 and r < 2800:
    ans = "ARC"

else:
    ans = "AGC"

print(ans)

Solution (Python):
n=int(input())
if(n<1200):
    print("ABC")
elif(n<2800):
    print("ARC")
else:
    print("AGC")

Solution (Python):
R=input()
R=int(R)

if R<1200:
    print("ABC")
elif R>=1200 and R<2800:
    print("ARC")
elif R>=2800:
    print("AGC")

Solution (Python):
R = int(input())

if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R = int(input())
if R < 1200:
    print("ABC")
elif 1200 <= R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

mod = 1000000007

"""


    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())


    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

if __name__ == "__main__":
    R = int(sys.stdin.readline())
    if 0 <= R < 1200:
        print("ABC")
    elif 1200 <= R < 2800:
        print("ARC")
    else:
        print("AGC")

Solution (Python):
def main():
    R = int(input())
    if R < 1200:
        return "ABC"
    elif R < 2800:
        return "ARC"
    else:
        return "AGC"

if __name__ == '__main__':
    print(main())

Solution (Python):
R = int(input())
if R < 1200: print('ABC')
elif R < 2800: print('ARC')
else: print('AGC')

Solution (Python):
r = int(input())
if r > 2799:
    print("AGC")
else:
    if r > 1199:
        print("ARC")
    else:
        print("ABC")

Solution (Python):
r = int(input())

if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r = int(input())
print('ABC' if r < 1200 else 'ARC' if r < 2800 else 'AGC')

Solution (Python):
r = int(input())

if (r < 1200):
	print ("ABC")
elif (r < 2800):
	print ("ARC")
else:
	print ("AGC")

Solution (Python):
N = int(input())
print('ABC' if N < 1200 else 'ARC' if N < 2800 else 'AGC')

Solution (Python):
import os, sys, re, math

lines = sys.stdin.readlines()

R = int(lines[0])

print ('ABC' if R < 1200 else 'ARC' if R < 2800 else 'AGC')

Solution (Python):
n=int(input());print("ABC"if n<1200 else"ARC"if n<2800 else"AGC")

Solution (Python):
r = int(input())
print("ABC" if r<1200 else "ARC" if r<2800 else "AGC")

Solution (Python):
a=int(input())
print("AGC" if a>2799 else "ARC" if a>1199 else "ABC")

Solution (Python):
n = int(input())

if n < 1200:
    print("ABC")
elif n < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
a = int(input())
print('ABC' if a<1200 else 'ARC' if a < 2800 else 'AGC')

Solution (Python):
r = int(input())
s = ""
if r < 1200:
    s = "ABC"
elif r < 2800:
    s = "ARC"
else:
    s = "AGC"
print(s)

Solution (Python):
R = int(input())
if R < 1200:
  print("ABC")
elif 1200 <= R < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R = int(input())
print('ABC' if R<1200 else 'ARC' if R<2800 else 'AGC')

Solution (Python):
a=int(input())
print('ABC' if a<1200 else 'ARC' if a<2800 else 'AGC')

Solution (Python):
r = int(input())

if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())
print("ABC" if r < 1200 else ("ARC" if r < 2800  else "AGC"))

Solution (Python):
X = input().split()
x = int(X[0])
if x < 1200:
    print('ABC')
elif 1200 <= x < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())
print("ABC" if R < 1200 else "ARC" if R < 2800 else "AGC")

Solution (Python):
r = int(input())

s = 'G'
if r < 1200:
    s = 'B'
elif r < 2800:
    s = 'R'
print('A'+s+'C')

Solution (Python):
a=int(input())
if a<1200:
  print("ABC")
elif 1200<=a<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
N = int(input())
print('ABC' if N < 1200 else 'ARC' if N < 2800 else 'AGC')

Solution (Python):
R = int(input())
if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
def solve():
    r = int(input())
    if r < 1200:
        return "ABC"
    elif r < 2800:
        return "ARC"
    else:
        return "AGC"


if __name__ == "__main__":
    print(solve())

Solution (Python):
r = int(input())

if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
print(["ABC","ARC","AGC"] [int(input())//50+8>>5])

Solution (Python):
print(["ABC","ARC","AGC"][int(input())//50+8>>5])

Solution (Python):
R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R=int(input())

print(["ABC","ARC","AGC"][R//50+8>>5])

Solution (Python):

N = int(input())

if N < 1200:
  print('ABC')
elif N < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r = int(input())

print('ABC' if r < 1200 else 'ARC' if r< 2800 else 'AGC')

Solution (Python):

R=int(input())
if R<1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
print('ABC' if r < 1200 else 'ARC' if r < 2800 else 'AGC')

Solution (Python):
r=int(input())
print("ABC" if r<1200 else "ARC" if r<2800 else "AGC")

Solution (Python):
def main():
    R = int(input())

    if 0 <= R < 1200:
        print('ABC')
    elif 1200 <= R < 2800:
        print('ARC')
    else:
        print('AGC')


main()

Solution (Python):
r = int(input())
print("ABC" if r <1200 else "ARC" if r <2800 else "AGC")

Solution (Python):
r=int(input())
print("ABC" if r<1200 else "ARC" if r<2800 else "AGC")

Solution (Python):
r = int(input())
if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):

def main():


    R = int(input())
    

    if R < 1200:
        print("ABC")
    
    elif R < 2800:
        print("ARC")
    else:
        print("AGC")

if __name__== "__main__":
    main()

Solution (Python):
r=int(input());print([['AGC','ARC'][r<2800],'ABC'][r<1200])

Solution (Python):
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
def test():
    r = int(input())
    rank = {1199:"ABC",2799:"ARC",4200:"AGC"}

    if r < 1200:
        print(rank[1199])
    elif r >= 1200 and r < 2800:
        print(rank[2799])
    else:
        print(rank[4200]) 


if __name__ == "__main__":
    test()

Solution (Python):
r = int(input())
if r < 1200:
    print("ABC")
elif 1200 <= r < 2800:
    print("ARC")
elif r >= 2800:
    print("AGC")

Solution (Python):
R=int(input())

if R<1200:
    print('ABC')
elif R>=1200 and R<2800:
    print('ARC')
else :
    print('AGC')

Solution (Python):
print(["ABC","ARC","AGC"][int(input())//100+4>>4])

Solution (Python):
import math





inputa = input().split()





a = int(inputa[0])







if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
print("ABC" if r < 1200 else "AGC" if r >=2800 else"ARC")

Solution (Python):
r = int(input())
print("ABC" if r < 1200 else "ARC" if r < 2800 else "AGC")

Solution (Python):
r=int(input())
if r<1200:
    print('ABC')
elif r<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
x = int(input())

if x<1200:
  print("ABC")
elif x<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
print(["ABC", "ARC", "AGC"][int(input())//50+8>>5])

Solution (Python):
r = int(input())
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
N = int(input())

if N < 1200:
  print ("ABC")
elif N < 2800:
  print ("ARC")
else:
  print ("AGC")

Solution (Python):
print(["ABC","ARC","AGC"][int(input())//50+8>>5])

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif 1200 <= R and R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r=int(input())
if r < 1200:
  s='B'
elif r < 2800:
  s='R'
else:
  s='G'
print('A'+s+'C')

Solution (Python):
r=int(input())
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):

R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif 1200<=R<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif 1200 <= r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):

r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
  print("ABC")
elif R <2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
a = int(input())
if a<1200:
  print('ABC')
elif a<2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
r=int(input())
print("ABC" if r<1200 else ("AGC","ARC")[r<2800])

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())

if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())

if r <1200:
  print('ABC')

elif 1200 <= r and r < 2800:
  print('ARC')

else:
  print('AGC')

Solution (Python):
N = int(input())
if N <1200:
  print("ABC")
elif N <2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r=int(input())
if r<1200:
    print('ABC')
elif 1200<=r<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())

if (R < 1200):
  print('ABC')
elif (R >=1200 and R < 2800):
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R >= 2800:
    print("AGC")
else:
    print("ARC")

Solution (Python):
R=int(input())
if R>=0 and R<1200:
	print('ABC')
elif R<2800:
	print('ARC')
else:
	print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R=int(input())

if R<1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):

R=int(input())
ans="unnamed"
if R<1200:
    ans="ABC"
elif 1200<=R<2800:
    ans="ARC"
elif 2800<=R:
    ans="AGC"

print(ans)

Solution (Python):
R = int( input() )

if R < 1200:
  print('ABC')
elif R<2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):


R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())
if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):

def main():
    a = int(input())

    if a < 1200:
        print('ABC')
    elif a < 2800:
        print('ARC')
    else:
        print('AGC')


if __name__ == '__main__' :
    main()

Solution (Python):

r = int(input())
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())
if R<1200:
    print('ABC')
elif 1200<=R<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())

if r<1200:
    print("ABC")
elif r<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())

if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
R = int(input())
if R < 1200:
  print("ABC")
elif R <2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r=int(input())

print('ABC' if r<1200 else 'ARC' if r<2800 else 'AGC')

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
n = int(input())
if n<1200:
    print("ABC")
elif n<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
a=int(input());print("A"+chr(66+(a>1199)*16-(a>2799)*11)+"C")

Solution (Python):
a=int(input());print("A"+"BRG"[(a>1199)+(a>2799)]+"C")

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
P = int(input())

if P<1200:
  print("ABC")
elif P<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
n = int(input())
if n <= 1199:
  print("ABC")
elif n <= 2799:
  print("ARC")
else:
  print("AGC")

Solution (Python):
x = int(input())
if x < 1200:
  print('ABC')
elif 1200 <= x < 2800:
  print('ARC')
elif x >= 2800:
  print('AGC')

Solution (Python):
r=int(input())

if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
n = int(input())
if n >= 2800:
    print("AGC")
elif n < 1200:
    print("ABC")
else:
    print("ARC")

Solution (Python):
n=int(input())
if n<1200:
    print("ABC")
elif n<2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
n = int(input())
if n < 1200:
  print('ABC')
elif n < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):

r = int(input())

if r < 1200:
    res = "ABC"
elif r < 2800:
    res = "ARC"
else:
    res = "AGC"

print(res)

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    N = int(input())
    if N < 1200:
        print('ABC')
    elif N<2800 and N >= 1200:
        print('ARC')
    else:
        print('AGC')
    
if __name__ == '__main__':
    main()

Solution (Python):
r = int(input())

if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())
if r < 1200:
  print("ABC")
elif 1200 <= r < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
n = int(input())
if n < 1200:print('ABC')
elif n < 2800:print('ARC')
else:print('AGC')

Solution (Python):
i=int(input())
print("ABC" if i<1200 else "ARC" if 1200<=i<2800 else"AGC")

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):



R = int(input())


if R < 1200:
    ans = 'ABC'
elif R < 2800:
    ans = 'ARC'
else:
    ans = 'AGC'


print(ans)

Solution (Python):
R = int(input())

if R<1200:
  print("ABC")
elif R<2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())
if r>=2800:
  print('AGC')
elif 1200<=r<2800:
  print('ARC')
else:
  print('ABC')

Solution (Python):
R = int(input())
if R<1200:
  print('ABC')
elif R<2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r=int(input())
print("ABC" if r < 1200 else "ARC" if r < 2800 else "AGC")

Solution (Python):
N = int(input())
if N<1200:
    print('ABC')
elif N<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
a = int(input())
if a < 1200 :
  print('ABC')
elif 1200 <= a < 2800 :
  print('ARC')
else :
  print('AGC')

Solution (Python):
R = int(input())
if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
n = int(input())

if n<1200:
  print("ABC")
  
elif 1200<=n<2800:
  print("ARC")
  
else:
  print("AGC")

Solution (Python):
r=int(input())
if r<1200:
    print('ABC')
elif r<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())
if r < 1200:
    print("ABC")
if 1200 <= r < 2800:
    print("ARC")
if 2800 <= r:
    print("AGC")

Solution (Python):
R = int(input())





if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
r = int(input())

if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
n=int(input())
print('ABC' if n<1200 else 'ARC' if n<2800 else 'AGC')

Solution (Python):
R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip()

if __name__ == "__main__":
    r = int(input())

    if r < 1200:
        print("ABC")
    elif r < 2800:
        print("ARC")
    else:
        print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
a = int(input())
if a < 1200:
    print("ABC")
elif 1200 <= a < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
r = int(input())

if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Solution (Python):
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')