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



Sample input:
1199


Sample output:
ABC

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import logging
import time


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

    # 入力
    def input_value(self):
        # self.n = int(input())
        # self.A, self.B = map(int, input().split())
        # self.A = list(map(int, input().split()))
        # self.a, self.b, self.c = map(int, [input() for i in range(4)])
        # self.t = [None] * self.n
        self.r = int(input())

    @staticmethod
    def run(r):
        if r < 1200:
            return 'ABC'
        elif r < 2800:
            return 'ARC'
        # logging.debug(str(count))
        return 'AGC'

    # @staticmethod
    # def test():
    #     a = []
    #     for i in range(10 ** 5):
    #         a.append(1000001)
    #
    #     start_time = time.time()
    #
    #     assert Solver.run(2, [4, 1, 5]) == 3, 'Error.'
    #     assert Solver.run(17, [29, 7, 5, 7, 9, 51, 7, 13, 8, 55, 42, 9, 81]) == 6, 'Error.'
    #     assert Solver.run(400000000, [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, ]) == 25, 'Error.'
    #
    #     assert Solver.run(10, a) == 0, 'Error.'
    #
    #     elapsed_time = time.time() - start_time
    #     logging.debug('elapsed_time: {0}'.format(elapsed_time) + '[sec]')


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

    solver = Solver()

    # Solver.test()

    solver.input_value()
    ans = solver.run(solver.r)
    # print(str(ans))
    print(ans)

Submission status: Accepted

Solution code:
R = int(input())

ABC = 1200
ARC = 2800

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R = int(raw_input())

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

Submission status: Accepted

Solution code:
i = int(input())

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

Submission status: Accepted

Solution code:
# encoding: utf-8
R = int(input())

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

Submission status: Accepted

Solution code:
p=print
n=(int)(input())
if n in range (1200):
    p('ABC')
elif n in range (2800):
    p('ARC')
else:
    p('AGC')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

R = int(stdin.readline())

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(R): #104-A
    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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

Solution code:
n=eval(input())
if n<1200:
	print("ABC")
elif n>=1200 and n<2800:
	print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

R = int(input())

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

Submission status: Accepted

Solution code:
from sys import stdin
r=int(stdin.readline().rstrip())
if r<1200:
	print('ABC')
elif r<2800:
	print('ARC')
else:
	print('AGC')

Submission status: Accepted

Solution code:
R=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-                                                                                                                                                                  
r = int(input())
if r >= 2800 :
    print("AGC")
elif r >= 1200:
    print("ARC")
else:
    print("ABC")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*-coding: utf-8 -*-
#A - Rated for Me

r = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R=int(input())

if R<1200:
    print("ABC")

elif R<2800:
    print("ARC")

else:
    print("AGC")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#encoding utf-8

r = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    R = int(input())
    if R<1200:
        return "ABC"
    elif R<2800:
        return "ARC"
    else:
        return "AGC"

if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R = int(input())

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

Submission status: Accepted

Solution code:
R = int(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())

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

print(b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
rate = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R=int(input())

if R<1200:
    print("ABC")

elif R<2800:
    print("ARC")

else:
    print("AGC")

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
R = int(input())

if R < 1200:
    ans = 'B'
elif R < 2800:
    ans = 'R'
else:
    ans = 'G'
print('A' + ans + 'C')

Submission status: Accepted

Solution code:
# coding: utf-8


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env 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"

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

Solution code:
r = int(input())
if 0 <= r <= 1199:
	print("ABC")
elif 1200 <= r <= 2799:
	print("ARC")
else:
	print("AGC")

Submission status: Accepted

Solution code:
#abc104a

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
print("A"+list("BRG")[(int(input())+400)//1600]+"C")

Submission status: Accepted

Solution code:
# -*- coding UTF-8 -*-
R = int(input())
if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
print'A%sC'%'BRG'[input()/100+4>>4]

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
rate = int(input())

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

Submission status: Accepted

Solution code:
R = int(input())

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

Submission status: Accepted

Solution code:
score = int(input())

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

Submission status: Accepted

Solution code:
r=int(input())
s='AGC'

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())


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

Submission status: Accepted

Solution code:
def test():
    rate = int(input(""))
    if rate<1200:
        print("ABC")
    elif rate<2800:
        print("ARC")
    else:
        print("AGC")

test()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
r = int(raw_input())
if r < 1200:
	print 'ABC'
elif r < 2800:
	print  'ARC'
else:
	print 'AGC'

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

Solution code:
R=int(input())
while True:
    if R<1200:
        print("ABC")
        break
    if R<2800:
        print("ARC")
        break
    if R>=2800:
        print("AGC")
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':

    R = int(input())

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

Submission status: Accepted

Solution code:
#coding: utf-8

r = int(raw_input(""))

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R = int(input())

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

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

if 2800<=R<=4208:
 print ("AGC")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

r=int(input())

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

Submission status: Accepted

Solution code:
R   = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

print(m())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
in_int=int(input())

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

Submission status: Accepted

Solution code:
R = int(input())

if R <= 1199:
    print("ABC")
elif R <= 2799:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
n=int(input())
if(n<1200):
    print("ABC")
elif(n<2800):
    print("ARC")
else:
    print("AGC")
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Submission status: Accepted

Solution code:
# coding on a smartphone with a large amount of alcohol
n = int(input())
if n < 1200:
  print("ABC") 
elif n < 2800: 
  print("ARC")
else: 
  print("AGC")

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

Solution code:
rate = int(input())

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

Submission status: Accepted

Solution code:
R = int(input())

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

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

Solution code:
R = int(input())
contests = ('ABC','ARC','AGC')

if(R < 1200):
    print(contests[0])
elif(R >= 1200 and R < 2800):
    print(contests[1])
else:
    print(contests[2])

Submission status: Accepted

Solution code:
N = list(map(int, input().split()))

if N[0] < 1200:
    print("ABC")
elif N[0] >= 1200 and N[0] < 2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

a = raw_input()
r=int(a)
if r<=1199:
    print'ABC'
elif r<=2799:
    print'ARC'
else:
    print'AGC'

Submission status: Accepted

Solution code:
r=int(input())

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

Submission status: Accepted

Solution code:
R=int(input())

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

if __name__ == '__main__':
  r = int(input())
  print(getNextRate(r))

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
 print("ABC")
if R >= 1200 and R <2800:
 print("ARC")
if R >= 2800:
 print("AGC")

Submission status: Accepted

Solution code:
R = int(input())

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

Submission status: Accepted

Solution code:
rate = int(input(''))

ans = 'AGC'

if  rate < 2800:
    ans =  'ARC '

if  rate < 1200:
    ans = 'ABC'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# temp
A = int(input())

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

Submission status: Accepted

Solution code:
R = int(input())

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

Submission status: Accepted

Solution code:
x = int(input())
print('ABC' if x < 1200 else "ARC" if x < 2800 else 'AGC')

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
rate=int(input())
result=""
if rate<1200:
  result="ABC"
elif rate<2800:
  result="ARC"
else:
  result="AGC"
print(result)

Submission status: Accepted

Solution code:
def main():
    R = int(raw_input())

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

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
a=int(input())

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

Submission status: Accepted

Solution code:
def A():
    r = int(input())
    contest = ['ABC','ARC','AGC']
    index = 0
    if r < 1200:
        index = 0
    elif r >= 1200 and r < 2800:
        index = 1
    else:
        index = 2
    print(contest[index])
    

if __name__ =='__main__':
    A()

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

Solution code:
s = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
b=int(a)
if b<1200:
    print("ABC")
elif b>=1200 and b<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
import sys
n = int(input())

if(n < 1200):
    print('ABC')
elif(n >= 1200 and n <= 2799):
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
val = int(input())
ans = ""
if val < 1200 and val >= 0:
    ans = ans + ("ABC")
if val < 2800 and val >= 1200:
    ans = ans + ("ARC")
if ans == "":
    ans  = ans + "AGC"
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
R = int(input())

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

Submission status: Accepted

Solution code:
import sys
s = int(input())
if s < 1200:
    print("ABC")
    sys.exit()
if s < 2800:
    print("ARC")
    sys.exit()
else:
    print("AGC")

Submission status: Accepted

Solution code:
rating = int(input())
if rating >= 0 and rating < 1200:
    print('ABC')
elif rating >= 1200 and rating < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    num = int(input())
    if num < 1200:
        print("ABC")
    elif num < 2800:
        print("ARC")
    else:
        print("AGC")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = int(input())

if (a<1200) :
   print("ABC")

elif (a<2800):
   print("ARC")

else :
   print("AGC")