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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
n = len(S)
for m in range (3, n):
    if S[m-1] == C:
        Count_C = Count_C + 1
        S[m-1].lower()
if S[1] == A:
    Count_A = 1
    S[1].lower()
if(Count_C == 1 and Count_A == 1 and S.islower()):
    print('AC')
else:
    print('WA')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


if __name__ == '__main__':
    main18()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
if n<1200:
    print(‘abc’)
elif n<2800:
    print(‘arc’)
else:
    print(‘agc’)

Submission status: Runtime Error

Solution code:
D, G = map(int, input().split())
pc = [list(map(int, input().split())) for _ in range(D)]
sum_list = [(i+1)*100*pac[0] for i, pac in enumerate(pc)]
max_list = [(i+1)*100*pac[0]+pac[1] for i, pac in enumerate(pc)]
stoc = 0
shiyouzumi = []
ichian = 0
nian = 0
while 1:
    kouho1 = []
    kouho2 = []
    for i in range(D):
        if i in shiyouzumi:
            continue
        if G <= sum_list[i]:
            kouho1.append(i)
        if G <= max_list[i]:
            kouho2.append(i)
    if kouho1 != []:
        saikou = kouho1[-1]
        for i in range(pc[saikou][0]+1):
            if i*(saikou+1)*100 >= G :
                ichian = stoc+i
                break
    if kouho2 != []:
        mini = 1000
        for i in kouho2:
            if mini > pc[i][0]:
                mini = pc[i][0]
        nian = stoc+mini
    chiisai = min(ichian, nian)
    if chiisai != 0:
        print(chiisai)
        exit()
    kouritsu = 0
    kouritsu_i = -1
    for i, s in enumerate(max_list):
        if i in shiyouzumi:
            continue
        if s/pc[i][0] > kouritsu:
            kouritsu_i = i
            kouritsu = s/pc[i][0]
    stoc += pc[kouritsu_i][0]
    G -= max_list[kouritsu_i]
    shiyouzumi.append(kouritsu_i)

Submission status: Runtime Error

Solution code:
D,G= map(int,input().split())
pc=[]
for i in range(D):
  p,c= map(int,input().split())
  pc.append([p,c])
i=D
minN=100000
while i>0:
  #t=pc[i][0]*100*(i+1)+pc[i][1]
  t=pc[i-1][0]*100*(i)+pc[i-1][1]
  if t>=G:
    
    n=pc[i-1][0]
    minN=min(n,minN)
    while n-1>0:
      t1=(n-1)*100*(i)
      if t1>G:
        n=n-1
        continue
      else:
        minN=minN(minN,n+1)
      n=n-1
    
  i=i-1
print(minN)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
 
from math import ceil
 
D, G = [int(t) for t in input().split()]
p = []
c = []
for i in range(D):
    p_, c_ = [int(t) for t in input().split()]
    p.append(p_)
    c.append(c_)
 
def minsolve(G, p, c, i):
    """100i点以下の問題だけでGを達成する最小問題数"""
    if i <= 0:
        return float('inf')
    n = min(ceil(G / (100 * i)), p[i-1])
    s = 100 * i * n
    if n == p[i-1]:
        s += c[i-1]
    if s >= G:
        return min(n, minsolve(G, p, c, i-1))
    else:
        return min(n + minsolve(G - s, p, c, i-1), minsolve(G, p, c, i-1))
 
m = min(minsolve(G, p, c, i) for i in range(1, D+1))
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
S1 = list(S)
i = 0

if ((S1[1] == 'C') or (S1[-1] == 'C')):
    print('WA')
elif ((S1[0] == 'A') and (S1[2:-1].count('C') == 1)):
    S1.remove('A')
    S1.remove('C')
    while i <= len(S1):
        if S1[i].isupper():
            print('WA')
            i += 1
        break
    else:
        print('AC')

Submission status: Runtime Error

Solution code:
# coding: utf-8
#codebegin
R=input()
r=int(R)
if r<1200:
    print("ABC"):
if r>(1200-1) and r<2800:
    print("ARC")
if r>(2800-1):
    print("AGC")

Submission status: Runtime Error

Solution code:
# using-utf8
#codebegin
R=input()
r=int(R)
if r<1200:
    print("ABC"):
if r>(1200-1) and r<2800:
    print("ARC")
if r>(2800-1):
    print("AGC")

Submission status: Runtime Error

Solution code:
R = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
result=""
count=0
l=len(s)
for i in range(l):
  if i==0 and s[i]="A":
    result="WA"
    break
  elif i==1 and ord(s[1])<97 
    result="WA"
    break
  elif i==l-1 and ord(s[l-1])<97:
    result="WA"
    break
  else:
    if ord(s[i])<97:
      count+=1
    if count>1 or s[i]!="C":
      result="WA"
      break
if result!="WA"
  result="AC"
print(result)

Submission status: Runtime Error

Solution code:
if s[0]=='A':
    if s[2:-2].count('C')==1:
        if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower() :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Runtime Error

Solution code:
s=input()
if s[0]=='A':
  if s[2:-2].count('C')==1:
    if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower() :
  		print('AC')
    else:
    	print('WA')
  else:
  	print('WA')
else:
  print('WA')

Submission status: Runtime Error

Solution code:
S = str(input())
flag = False
 
if S.startswith("A"):
  if ((S[2]) == "C") ^ (S["-2"]=="C"):
  	index = S.find("C")
    for i, s in enumerate(S):
      if (i == 0) or (i == index):
        continue
      if s.islower():
        continue
        if i == len(s):
          flag == True
 
if flag == True:
  print("AC")
else:
  print("WA")

Submission status: Runtime Error

Solution code:
#a,b=map(int,input().split())
a=map(int,input())
if a<2800:
	print("ABC")
else:
	print("ARC")

Submission status: Runtime Error

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

r = raw_input()
r=r-0x30
if r<=1199:
    print'ABC'
elif r<=2799:
    print'ARC'
else:
    print'AGC'

Submission status: Runtime Error

Solution code:
r=int(imput())

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

Submission status: Runtime Error

Solution code:
R = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
function Main(input) {
  input = input.split("\n");
  var r = parseInt(input[0].split(" ")[0]);
  var ans = "AGC";
  if(r<1200){
    ans = "ABC";
  }else if(r<2800){
    ans = "ARC";
  }
  console.log('%s', ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

R = int(input())

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

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;

int main() {
	int n;

	cin >> n;

	if (n < 1200)
		cout << ABC;
	else if (n < 2800)
		cout << ARC;
	else
		cout << AGC;

	return 0;
}

Submission status: Runtime Error

Solution code:
inputs  input()
R = int(inputs)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#a,b=map(int,input().split())
a=input()
if a<2800:
	print("ABC")
else:
	print("ARC")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
R = int(input())
if R<1200:

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
v = int(input())

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

Submission status: Runtime Error

Solution code:
#a,b=map(int,input().split())
a=input()
if(a<2800):
	print("ABC")
else:
	print("ARC")