#SCCCIE000017. Cuộc thi phù hợp rating (Rated for Me)

Cuộc thi phù hợp rating (Rated for Me)

Rated for Me

Source: AtCoder

Problem Statement

For rating RR, ABC is rated below 12001200, ARC below 28002800, and AGC for everyone. Print the next contest that is rated for this participant.

Input

One line contains RR.

Output

Print one of ABC, ARC, or AGC.

Subtasks

  • Subtask 1 (100%): 0≤R≤42080 \le R \le 4208

Examples

Example 1

Input

1199

Output

ABC

Explanation

For the sample values 1199, evaluating the conditions in the statement gives ABC. Therefore the program prints the shown output.

Example 2

Input

1200

Output

ARC

Explanation

For the sample values 1200, evaluating the conditions in the statement gives ARC. Therefore the program prints the shown output.

Example 3

Input

4208

Output

AGC

Explanation

For the sample values 4208, evaluating the conditions in the statement gives AGC. Therefore the program prints the shown output.