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):
A=int(input())
if A<1200:
    print("ABC")
elif 1200<=A<2800:
    print("ARC")
else:
    print("AGC")

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

if r <= 1199:
  print("ABC")
elif r > 1199 and r <= 2799:
  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):
import sys
input = sys.stdin.readline

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 1199<a<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 >= 2800:
  print("AGC")
elif R < 2800 and 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):
rate=int(input())
if rate<1200:
    ans="ABC"
elif rate>=1200 and rate<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:
    ans = "ABC"
elif R <2800:
    ans = "ARC"
else:
    ans = "AGC"

print(ans)

Solution (Python):
r=int(input())
if r < 1200:
    print('ABC')
elif 1200 <= 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):
a=int(input())
print("ABC" if a<=1199 else "ARC" if a<=2799 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())
print(["AGC","ARC","ABC"][(a < 2800) + (a < 1200)])

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):
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 >= 1200 and 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("A"+("B" if n<1200 else "G" if n>2799 else "R")+"C")

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

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

Solution (Python):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


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

Solution (Python):
R = int(input())
ls = [0, 1200, 2800, 4400]
name = ['ABC', 'ARC', 'AGC']
for i, (x, y) in enumerate(zip(ls, ls[1:])):
    if x <= R < y:
        print(name[i])

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):
x = int(input())
if x <= 1199:
  print('ABC')
elif x <= 2799:
  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())
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):
def main():
  R = int(input())

  if R < 1200:
    print('ABC')
  elif R < 2800:
    print('ARC')
  else:
    print('AGC')
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):
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())
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):
a = int(input())
if a < 1200 :
    print('ABC')
elif a >= 1200 and 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):
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())

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 >=1200 and 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 0 <= R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
elif R <= 4208:
    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):
n = int(input())
if n < 1200:
    print("ABC")
elif n < 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 >= 2800:
    print('AGC')
elif R < 1200:
    print('ABC')
else:
    print('ARC')

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())
print('ABC' if R < 1200 else 'ARC' if 1200 <= R < 2800 else 'AGC')

Solution (Python):
S = int(input())
print("ABC" if S < 1200 else "ARC" if S < 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):
R = int(input())
print(["ABC", "ARC", "AGC"][(1200<=R<2800) - (2800<=R)])

Solution (Python):
a = int(input())
if a < 1200:
 print("ABC")
elif a < 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):
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):


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):
R=int(input())
if R<1200: print("ABC")
elif R<2800: print("ARC")
else: print("AGC")

Solution (Python):
R = input()
R = int(R)
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):

import sys
import itertools
import collections
import functools
import math
from queue import Queue
INF = float("inf")


def solve(R: int):
    if R < 1200:
        print("ABC")
    elif R < 2800:
        print("ARC")
    else:
        print("AGC")
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    R = int(next(tokens))  
    solve(R)


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 >= 1200 and 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())
print("ABC" if r<1200 else "ARC" if r<2800 else "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("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 >= 1200 and 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):
N = int(input())
if N < 1200:
    print("ABC")
elif N < 2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
i=int(input())
if i<1200:
  print("ABC")
elif i<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):
n=int(input())
if n<1200:
  print('ABC')
elif n<2800:
  print('ARC')
else:
  print('AGC')

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

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):
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):
score = int(input())

if score < 1200:
  print("ABC")
elif score < 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())

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

Solution (Python):
r=int(input());print(['ARC'*(r-1199>0)or'ABC','AGC'][r-2799>0])

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())
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 < 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 < 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):
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):
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18

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

Solution (Python):

import sys

def main():
	R = int(input())	
	if R < 1200:
		print("ABC")
		sys.exit()
	if R < 2800:
		print("ARC")
		sys.exit()
	
	print("AGC")
		
if __name__ == "__main__":
	main()

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 1200<=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 r < 2800:
  print('ARC')
else:
  print('AGC')

Solution (Python):
rate = int(input())
if rate < 1200:
    print("ABC")
elif rate < 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>=2800:
    print("AGC")
elif r>=1200:
    print("ARC")
else:
    print("ABC")

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","ARC"][r>1199],"AGC"][r>2799])

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):
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())

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<2800:
    print('ARC')
else:
    print('AGC')

Solution (Python):
a = int(input())
if a<1200:
  print("ABC")
elif a<2800 and a>=1200:
  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>=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")
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):
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800 and R >= 1200:
  print("ARC")
elif R >= 2800:
  print("AGC")

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

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

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):
a=int(input())
if a<=1199:
  print('ABC')
elif a<=2799:
  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):
n=int(input())
if 1200>n:
    print("ABC")
elif 2800>n:
    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):

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

Solution (Python):
def rated_for_me(R: int)->str:
    if R < 1200:
        return 'ABC'
    if R < 2800:
        return 'ARC'
    return 'AGC'


if __name__ == "__main__":
    R = int(input())
    ans = rated_for_me(R)
    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 solve(string):
    r = int(string)
    return "ABC" if r < 1200 else "ARC" if r < 2800 else "AGC"


if __name__ == '__main__':
    print(solve(input()))

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())
print('ABC' if a<1200 else 'ARC' if a<2800 else '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):
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):
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):
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):
def solve():
    R = int(input())
    if R < 1200:
        return 'ABC'
    elif R < 2800:
        return 'ARC'
    else:
        return 'AGC'

print(solve())

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
import numpy as np


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 = "AGC"
if R < 1200:
    ans = "ABC"
elif R < 2800:
    ans = "ARC"
print(ans)

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:
     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())
r = 'AGC'
if R<2800: r='ARC'
if R<1200: r='ABC'
print(r)

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:
    ans = "ABC"
elif R < 2800:
    ans = "ARC"
else:
    ans = "AGC"

print(ans)
print()

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):
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):

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")
else:
    print("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')
if 1200 <= r & r < 2800:
    print('ARC')
if 2800 <= r:
    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):
from sys import stdin
n = int(stdin.readline().rstrip())
if n<1200:
  print('ABC')
elif n>=1200 and n<2800:
  print('ARC')
elif n>=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):
def main():
    R = int(input())
    if R < 1200:
        print("ABC")
    elif R < 2800:
        print("ARC")
    else:
        print("AGC")


if __name__ == "__main__":
    main()

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")
  exit()
if N < 2800:
  print("ARC")
  exit()
print("AGC")

Solution (Python):
s=int(input())
if s<1200:
  print("ABC")
elif 1200<=s<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())
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):
def main() -> None:
    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):
import sys

def main():
  input = sys.stdin.readline
  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())
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):
int_r = int(input())

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

Solution (Python):
R = int(input())
ans = 'ABC' if R < 1200 else 'ARC' if R < 2800 else '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):
r = int(input())
 
if r < 1200:
  print("ABC")
elif 1200 <= r < 2800:
  print("ARC")
elif 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):
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")
elif 2800<=r:
    print("AGC")

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

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