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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(['ABC','ARC','AGC'][int(input())//100+4>>4])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

Solution code:
print(["ABC","ARC","AGC"][int(input())//100+4>>4])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(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())
print('ABC' if N <1200 else 'ARC' if N <2800  else 'AGC')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r=int(input());print(["AGC","ARC","ABC"][sum(map(lambda x:r<x,[1200,2800]))])

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

Submission status: Accepted

Solution code:
r = int(input())
ans = ""

if r < 1200:
    ans = "ABC"

elif r >=1200 and r < 2800:
    ans = "ARC"

else:
    ans = "AGC"

print(ans)

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

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

Submission status: Accepted

Solution code:
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

mod = 1000000007

"""
# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

if __name__ == "__main__":
    R = int(sys.stdin.readline())
    if 0 <= R < 1200:
        print("ABC")
    elif 1200 <= R < 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 > 2799:
    print("AGC")
else:
    if r > 1199:
        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:
N = int(input())
print('ABC' if N < 1200 else 'ARC' if N < 2800 else 'AGC')

Submission status: Accepted

Solution code:
import os, sys, re, math

lines = sys.stdin.readlines()

R = int(lines[0])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
print("AGC" if a>2799 else "ARC" if a>1199 else "ABC")

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = input().split()
x = int(X[0])
if x < 1200:
    print('ABC')
elif 1200 <= x < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
print(["ABC","ARC","AGC"] [int(input())//50+8>>5])

Submission status: Accepted

Solution code:
R=int(input())

print(["ABC","ARC","AGC"][R//50+8>>5])

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

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

Submission status: Accepted

Solution code:
#A-Rated for Me(ABC104)
R=int(input())
if R<1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

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

Submission status: Accepted

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

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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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());print([['AGC','ARC'][r<2800],'ABC'][r<1200])

Submission status: Accepted

Solution code:
def test():
    r = int(input())
    rank = {1199:"ABC",2799:"ARC",4200:"AGC"}

    if r < 1200:
        print(rank[1199])
    elif r >= 1200 and r < 2800:
        print(rank[2799])
    else:
        print(rank[4200]) 


if __name__ == "__main__":
    test()

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
    print("ABC")
elif 1200 <= r < 2800:
    print("ARC")
elif r >= 2800:
    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:
import math

# inputList=[]
# for i in range(6):
#     inputNum = input()
#     inputList.append(inputNum)
inputa = input().split()
# inputb = input().split()

# inputa = [int(n) for n in inputa]
# inputa.sort()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])


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

Submission status: Accepted

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

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(["ABC", "ARC", "AGC"][int(input())//50+8>>5])

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

Submission status: Accepted

Solution code:
r=int(input())
if r < 1200:
  s='B'
elif r < 2800:
  s='R'
else:
  s='G'
print('A'+s+'C')

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:
# ABC104-A
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:

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#conding-utf-8
R=int(input())
ans="unnamed"
if R<1200:
    ans="ABC"
elif 1200<=R<2800:
    ans="ARC"
elif 2800<=R:
    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:
#104

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():
    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:
#ABC105
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:
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:
r=int(input())

print('ABC' if r<1200 else 'ARC' if r<2800 else '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:
a=int(input());print("A"+chr(66+(a>1199)*16-(a>2799)*11)+"C")

Submission status: Accepted

Solution code:
a=int(input());print("A"+"BRG"[(a>1199)+(a>2799)]+"C")

Submission status: Accepted

Solution code:
P = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

r = int(input())

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

print(res)

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]
    N = int(input())
    if N < 1200:
        print('ABC')
    elif N<2800 and N >= 1200:
        print('ARC')
    else:
        print('AGC')
    
if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

# input
R = int(input())

# solve
if R < 1200:
    ans = 'ABC'
elif R < 2800:
    ans = 'ARC'
else:
    ans = 'AGC'

# output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
R = int(input())

# print(R)

# 高橋くんのレーティングが変動する次のコンテストの名称（ABC, ARC, AGC のいずれか）を出力せよ。

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().rstrip()

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

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    r = II()
    if r < 1200:
        print("ABC")
    elif r < 2800:
        print("ARC")
    else:
        print("AGC")
    return

#B
def B():
    return

#C
def C():
    d, g = LI()
    pc = LIR(d)
    ans = float("INF")
    tokumono = list(itertools.product((0, 1), repeat=d))
    #print(tokumono)
    for toku in tokumono:
        #print(toku)
        ansa = 0
        ansb = 0
        for i in range(len(toku)):
            if toku[i] == 1:
                ansa += pc[i][0]
                ansb += pc[i][0] * (i + 1) * 100 + pc[i][1]
        for k in range(len(toku) - 1, -1, -1):
            if toku[k] == 0:
                for i in range(pc[k][0] + 1):
                    #print(ans, ansb, ansa)
                    if i == pc[k][0]:
                        ansb += pc[k][1]
                    if ansb >= g:
                        ans = min(ans, ansa)
                        break
                    ansa += 1
                    ansb += (k+1) * 100
                break

        

    print(ans)
            

    return

#D
def D():
    N, X = LI()
    def dfs(n, x):
        #print(n, x)
        if x == 1 and n > 0:
            return 0 
        elif x < 2 ** (n + 1) - 1:
            return dfs(n - 1, x - 1)
        elif x == 2 ** (n + 1) - 1:
            return 2 ** n 
        elif x == 2 ** (n + 2) - 3:
            return 2 ** (n + 1) - 1
        else:
            return dfs(n - 1, x - 2 ** (n + 1) + 1) + 2 ** n 
    a = dfs(N, X)
    print(a)
        
    return


#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

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:
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:
n = int(input())
if n < 1200:
  print('ABC')
elif n < 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:
a = int(input())
if a < 1200:
    print("ABC")
elif 1200 <= 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:
#!/usr/bin/env python3
#ABC104 A

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:

R = int(input())

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

Submission status: Accepted

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

print(res)

Submission status: Accepted

Solution code:
#n, k = map(int,input().split())
#ls = list(map(int,input().split()))
r = int(input())
#s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

num = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
rate = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

R = n()

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(R: int):
    if R < 1200:
        print("ABC")
    elif R < 2800:
        print("ARC")
    else:
        print("AGC")
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    R = int(next(tokens))  # type: int
    solve(R)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r = int(input())
if r<1200: print("ABC")
else: print("AARGCC"[r>2799::2])

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:
# INPUT
r = int(input())

# PROCESS
answer = ""

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

print(answer)

Submission status: Accepted

Solution code:
def abc():
    R = int(input().rstrip())
    if R < 1200:
        print('ABC')
        return
    if R < 2800:
        print('ARC')
        return
    print('AGC')


abc()

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

if R < 1200:
    print('ABC')

elif 1200 <= R < 2800:
    print('ARC')

else:
    print('AGC')

Submission status: Accepted

Solution code:
r = int(input())

if r <= 1199:
    print("ABC")

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

Submission status: Accepted

Solution code:
r = int(input())
ls = ['ABC',"ARC","AGC"]

if r<1200:
    print(ls[0])
elif r<2800:
    print(ls[1])
else:
    print(ls[2])

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
input = sys.stdin.readline

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