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

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

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

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

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

rate = [1200, 2800, 4209]
contest = ['ABC', 'ARC', 'AGC']

for i in range(3):
    if r < rate[i]:
        break
print(contest[i])

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    r = ii()
    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):
R = int(input())
if R < 1200:
    print('ABC')
elif 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 < 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 main():
    R = int(input())

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

main()

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

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

Solution (Python):

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

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


print(main())

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

Solution (Python):


R = int(input())

if R < 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 >= 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 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())

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):
import sys
def input(): return sys.stdin.readline().strip()

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

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


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):
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):
def main():
    n = int(input())

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

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

get_contest(R)

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

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

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

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

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

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

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

import sys


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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    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>=1200 and 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")

elif r >= 2800:
    print("AGC")

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

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

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

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

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

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

Solution (Python):
r=int(input())
print("AGC" if r >= 2800 else "ARC" if r >= 1200 else "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):
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

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

Solution (Python):
import math
import collections
import sys


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

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

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

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

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

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

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

Solution (Python):

r = int(input())

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

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

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(["ARC","ABC","AGC"][R<1200 or -(R>=2800)])

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

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

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

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

Solution (Python):
if __name__ == '__main__':

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

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

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

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

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

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

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

Solution (Python):
R = int(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 <= 1199:
  print("ABC")
elif R <= 2799:
  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 (1200<=R) and (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('AGC')
else:
    print('ARC')

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

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

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

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

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

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

if '__main__' == __name__:
    resolve()

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

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

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


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

r = I()
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):
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect




from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
from datetime import datetime as dt

def main():
  r = int(readline())
  if r<1200:
    print('ABC')
  elif 1200<=r and 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):
def RatedforMe(r):

    return "ABC" if r < 1200 else "ARC" if r < 2800 else "AGC"

def main():
    r = int(input())
    print(RatedforMe(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):
import itertools
import fractions
def main():
  r = int(input())
  if r < 1200:
    print("ABC")
  elif 1200 <= r < 2800:
    print("ARC")
  else:
    print("AGC")
if __name__ == '__main__':
  main()

Solution (Python):

import collections


def solve():
    R = int(input())

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


if __name__ == "__main__":
    solve()

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

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

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

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

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

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

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

Solution (Python):



R = int(input())


def main():
    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):
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):
s = int(input())

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

Solution (Python):
rate = int(input())
if rate >= 2800:
  print("AGC")
elif rate >= 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):
K=int(input());print('ABC'*(K<1200)or'ARC'*(K<2800)or'AGC')

Solution (Python):
r=int(input());print(r//2800*'AGC'or'AARBCC'[r<1200::2])

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

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

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

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

Solution (Python):
import sys
import os

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.buffer.readline().rstrip())
    print('AGC' if N >= 2800 else 'ARC' if N >= 1200 else 'ABC')


if __name__ == '__main__':
    main()

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

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

    print(ans)


if __name__ == "__main__":
    main()