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

Solution (Python):
a = int(raw_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())

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

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

if (A>=0 and A<=1199):
  print("ABC")
elif (A>=1200 and A<=2799):
  print("ARC")
else:
  print("AGC")

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

if R < 1200:
    print('ABC')
    exit()

if R < 2800:
    print('ARC')
    exit()

print('AGC')

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

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

Solution (Python):
import sys
r = int(sys.stdin.readline())
if r < 1200: print("ABC")
elif r < 2800: print("ARC")
else: print("AGC")

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

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

n = int(input())

if n <= 1199:
    print('ABC')
elif n <= 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):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


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


def read_float():
    return float(input())


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


def read_str():
    return input()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(R):
    if R < 1200:
        return 'ABC'
    elif R < 2800:
        return 'ARC'
    return 'AGC'


def main():
    R = read_int()
    print(slv(R))


if __name__ == '__main__':
    main()

Solution (Python):
def fa(): 
    global ans
    print(ans)
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

N = getN()
if N < 1200:
    ans = "ABC"
elif N < 2800:
    ans = "ARC"
else:
    ans = "AGC"

fa()

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




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

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


if __name__ == '__main__':
    main()

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

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')
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):
v = int(input())
 
if v < 1200:
  print('ABC')
elif v < 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())
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 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):
N = int(input())
if N < 1200:
    print("ABC")
elif 1200 <= N < 2800:
    print("ARC")
elif 2800 <= N:
    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')
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():
    n = int(input())


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

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):
if __name__ == "__main__":
    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):
r = int(input())

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



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


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





ans = ""

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

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):
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):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
AtoZ = [chr(i) for i in range(65,65+26)]
atoz = [chr(i) for i in range(97,97+26)]

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

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

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):
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):
from sys import stderr
from functools import reduce
from operator import add
def f(): return [int(i) for i in input().split()]
def yes(n): print("Yes") if n else print("No")
def debug(*x, sep=" ", end="\n"):
    for item in x:
        stderr.write(repr(item))
        stderr.write(sep)
    stderr.write(end)

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

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

Solution (Python):
r = int(input())
if 0 <= r <= 1199:
	print("ABC")
elif 1200 <= r <= 2799:
	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):
import sys

stdin = sys.stdin

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

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

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)




def chkprint(*args):
    names = {id(v): k for k, v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg), '???')+' = '+repr(arg) for arg in args))




def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]




dp = None


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

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

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

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