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:
    ans = 'ABC'
elif 1200 <= 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())

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

print(ans)

Solution (Python):
import sys

r = int(sys.stdin.readline().rstrip())

def main():
    if r < 1200:
        return 'ABC'
    elif r < 2800:
        return 'ARC'
    else:
        return 'AGC'

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
R = int(input())
if R <= 1199:
    print("ABC")
elif R <= 2799:
    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):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    r=INT()
    if r<1200:
        print('ABC')
    elif r<2800:
        print('ARC')
    else:
        print('AGC')
if __name__ == '__main__':
    do()

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

Solution (Python):
import sys
input = sys.stdin.readline
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>=2800):
	print("AGC")
elif(R>=1200):
	print("ARC")
else:
	print("ABC")

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

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

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

Solution (Python):
import math

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

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

rate(int(input()))

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

Solution (Python):
import sys 

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

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

Solution (Python):
r=int(input())
A=['ABC','ARC','AGC']
if r in range(1200):
  print(A[0])
elif r in range(1200,2800):
  print(A[1])
else:
  print(A[2])

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

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

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

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

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

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

r = int(input())
if r < 1200:
    print('ABC')
    exit(0)
if r < 2800:
    print('ARC')
    exit(0)
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):
r = int(input())
if r < 1200:
    print("ABC")
elif 1200 <= 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 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):

import math




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

Solution (Python):

def solve(R: int):
    ans = ["ABC", "ARC", "AGC"]
    if R < 1200:
        print(ans[0])
    elif 1200 <= R < 2800:
        print(ans[1])
    else:
        print(ans[2])

def main():
    R = int(input())
    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 < 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:
    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):
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())
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:
  ret="ABC"
elif r<2800:
  ret="ARC"
else:
  ret="AGC"

print(ret)

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

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())

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

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




import sys














def main():
    r = int(sys.stdin.readline().rstrip())
    if r < 1200:
        ans = 'ABC'
    elif r < 2800:
        ans = 'ARC'
    else:
        ans = 'AGC'

    print(ans)


if __name__ == "__main__":
    
    main()

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

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

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 >= 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())
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):
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):
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 1199<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:
    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())
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())
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("AGC")
else:
  print("ARC")

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

R = int(read())

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

print(answer)

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

def judge(r):
    if r < 1200:
        print("ABC")
    elif (1200 <= r) & (r < 2800):
        print("ARC")
    elif 2800 <= r:
        print("AGC")

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

Solution (Python):
ans=['ABC','ARC','AGC']
R=int(input())
if R<1200:
    print(ans[0])
elif R<2800:
    print(ans[1])
else:
    print(ans[2])

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

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

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

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

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

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

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):
'''
A - Rated for Me
https://atcoder.jp/contests/abc104/tasks/abc104_a

>>> main(1199)
ABC
>>> main(1200)
ARC
>>> main(4208)
AGC
'''


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


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

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

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


def main():
    rate = int(input())
    if rate < 1200:
        print("ABC")
    elif rate < 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):
print(["ABC", "ARC", "AGC"] [int(input())//50+8 >> 5])

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    r = int(input().rstrip('\n'))
    if r < 1200:
        print("ABC")
    elif 1200 <= r < 2800:
        print("ARC")
    else:
        print("AGC")


if __name__ == '__main__':
    slove()

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

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

Solution (Python):
s = int(input())
if s >= 2800:
  print("AGC")
elif s >= 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):
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):
a=int(input())
if a < 1200:
  print("ABC")
elif a < 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):
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):
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")
else:
  if 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 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):
n = int(input().split()[0])

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")
  exit()
if r<2800:
  print("ARC")
  exit()
  
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())
print(['ABC', 'ARC', 'AGC'][0 if R<1200 else 1 if R<2800 else 2] )

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

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