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

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


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())
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):
print("A"+["B","R","G"][(int(input())+400)//1600]+"C")

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

Solution (Python):
import math
y = int(input().split()[0])
if y < 1200:
    print("ABC")
elif y <2800:
    print("ARC")
else:
    print("AGC")

Solution (Python):
n = int(raw_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 <=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:
    output="ABC"
elif R<2800:
    output="ARC"
else:
    output="AGC"
print(output)

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

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

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

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

print contest

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):
def solution(r):
    
    if r < 1200:
        return 'ABC'
    elif r < 2800:
        return 'ARC'
    else:
        return 'AGC'

def main():
    r = int(raw_input().strip())
    print solution(r)

if __name__ == '__main__':
    main()

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

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

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

import logging
import time


class Solver:
    def __init__(self):
        self.r = 0

    
    def input_value(self):
        
        
        
        
        
        self.r = int(input())

    @staticmethod
    def run(r):
        if r < 1200:
            return 'ABC'
        elif r < 2800:
            return 'ARC'
        
        return 'AGC'

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    


if __name__ == '__main__':
    logging.basicConfig(level=logging.DEBUG)

    solver = Solver()

    

    solver.input_value()
    ans = solver.run(solver.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())

ABC = 1200
ARC = 2800

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

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

R = int(stdin.readline())

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

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

Solution (Python):


def solve(R):
    if R < 1200: return "ABC"
    if R < 2800: return "ARC"
    return "AGC"

if __name__ == "__main__":
    R = int(input())
    print(solve(R))

Solution (Python):
import sys


def solve(R): 
    if 1200>R :
        return 'ABC'
    if 2800>R :
        return 'ARC'
    else:
        return 'AGC'


def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

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

Solution (Python):
def solved(n):
    if n < 1200:
        return 'ABC'
    elif n >= 1200 and n < 2800:
        return 'ARC'
    else:
        return 'AGC'
if __name__ == '__main__':
    n = int(input())
    print(solved(n))

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

Solution (Python):
s = int(input())
if s < 1200:
  print("ABC")
elif s < 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 stdin
r=int(stdin.readline().rstrip())
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):
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):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    r = I()
    if r < 1200:
        return 'ABC'
    if r < 2800:
        return 'ARC'
    return 'AGC'


print(main())

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

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

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

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

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

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

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

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

Solution (Python):


a = int(input())

b = "AGC"
if(a < 1200): b = "ABC"
elif(a < 2800): b = "ARC"

print(b)

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

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

if 0 <= n and 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:
 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):
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())
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())
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):

import math,string,itertools,fractions,heapq,collections,re,array,bisect

def s():
    return input()

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

Solution (Python):

def main17():
    strbuf = "U"
    strbuf2 = "N"
    strbuf3 = "K"
    print(strbuf + strbuf2 + strbuf3)

def main18():
    strbuf = input('');
    num = int(strbuf);
    if(num<1200):
        print("ABC");
    elif(num<2800):
        print("ARC");
    else:
        print("AGC");


if __name__ == '__main__':
    main18()

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 1200<=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:
    ans = 'B'
elif R < 2800:
    ans = 'R'
else:
    ans = 'G'
print('A' + ans + 'C')

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


from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(10000000)

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

Solution (Python):


'''
abc : < 1200
arc : < 2800
agc : all
'''


in_data = int(input())
if in_data < 1200:
	print('ABC')
elif in_data < 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):


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

Solution (Python):
def getinputdata():

    array_result = []    
    array_result.append(input().split(" "))

    flg = True

    try:
        while flg:

            data = input()

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

r=int(arr_data[0][0])

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("A"+list("BRG")[(int(input())+400)//1600]+"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 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):
print'A%sC'%'BRG'[input()/100+4>>4]

Solution (Python):
print('A'+'BRG'[int(input())//100+4>>4]+'C')

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

Solution (Python):
n=int(input())
if n<=1199: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):
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 >= 1200 and 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):
score = int(input())

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

if r < 1200:
    s='ABC'
elif r < 2800:
    s='ARC'
print(s)

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

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

test()

Solution (Python):
print(["ABC","ARC","AGC"][(int(input())+400)//1600])

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

Solution (Python):


r = int(raw_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())
while True:
    if R<1200:
        print("ABC")
        break
    if R<2800:
        print("ARC")
        break
    if R>=2800:
        print("AGC")
        break

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

Solution (Python):
r = int(raw_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())
s = "";
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):
if __name__ == '__main__':

    R = int(input())

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

Solution (Python):


r = int(raw_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):
n = int(input())

if(n<1200 and n>=0):
    print('ABC')
elif(n<2800 and n>=1200):
    print('ARC')
elif(n<=4208):
    print('AGC')

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

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

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

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

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

if 0<=R<1200:
 print ("ABC")

if 1200<=R<2800:
 print ("ARC")

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

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

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

print(m())

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

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

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

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