Harryxun/stf_run huggingface dataset:
a = int(input())
s = input()

if a >= 2300:
  print(s)
  elif a < 3200:
    print("red")

### FIXED CODE ###

a = int(input())
s = input()

if a >= 3200:
  print(s)
else:
  print("red")
#from collections import deque
#import copy

x,y,z,ansk=(int(i) for i in input().split())
#print(x,y,z,k)

a=list(int(i) for i in input().split())
a.sort(reverse=True)
b=list(int(i) for i in input().split())
b.sort(reverse=True)
c=list(int(i) for i in input().split())
c.sort(reverse=True)
#print(a,b,c)

mylist=[0 for i in range(x*y)]
k=0
for i in range(x):
  for j in range(y):
    mylist[k]=a[i]+b[j]
    k+=1
mylist.sort(reverse=True)
if len(mylist)>3001:
  xy=len(mylist)
  mylist=mylist[:3001]
#print(mylist)

k=0
mylist1=[0 for i in range(xy*z)]
for i in range(xy):
  for j in range(z):
    mylist1[k]=mylist[i]+c[j]
    k+=1
mylist1.sort(reverse=True)

if len(mylist1) > 3001:
  mylist1 = mylist1[:3001]
  
for i in range(ansk):
  print(mylist1[i])


### FIXED CODE ###

#import itertools

x,y,z,k=(int(i) for i in input().split())
#print(x,y,z,k)
a=list(int(i) for i in input().split())
a.sort(reverse=True)
b=list(int(i) for i in input().split())
b.sort(reverse=True)
c=list(int(i) for i in input().split())
c.sort(reverse=True)
#print(a,b,c)

#k=3000
#a=[int(i) for i in range(1000)]
#b=[int(i) for i in range(1000)]
#c=[int(i) for i in range(1000)]
x=[]
for h in range(len(a)):
    for i in range(len(b)):
        if (h+1)*(i+1) <=k:
            for j in range(len(c)):
                if (h+1)*(i+1)*(j+1) <=k:
                    x.append(a[h]+b[i]+c[j])

x.sort(reverse=True)
for i in range(k):
  print(x[i])
a,b,k=map(float, input().split())
c=[]
for i in range(1,a+1):
    if a%i==0 and b%i==0:
        c.append(i)
print(c[k-1])

### FIXED CODE ###

a,b,k=map(int, input().split())
c=[]
for i in range(1,min(a,b)+1):
    if (a%i==0) and (b%i==0):
        c.append(i)
print(c[len(c)-k])
S=input()
print(S,replace(',',' ')

### FIXED CODE ###

a,b,c=input().split(",")
print(a,b,c)
i = list(map(int,input().split()))
a = i[0]
b = i[1]
c = i[2]
d = i[3]

m = min(c,d)
n = max(c,d)

while m != 0:
  n = m
  m = n%m
  
  
g = n

s1 = (a-1)/c
t1 = (a-1)/d
u1 = (a-1)/g
x1 = b/c
y1 = b/d
z1 = b/g

A = (x1 + x2 - x3) - (s1 + t1 - u1)

print(A)



  

### FIXED CODE ###

i  = list(map(int,input().split()))
a = i[0]
b = i[1]
c = i[2]
d = i[3]

def gcd(n,m):
    x = min(n,m)
    y = max(n,m)
    while x != 0:
        x1 = x
        x = y%x
        y = x1
    return y

l = (c*d)//gcd(c,d)

count = (b - b//c - b//d + b//l) - ((a-1) - (a-1)//c - (a-1)//d + (a-1)//l)
print(count)
from sys import stdin

def main():
    n, m, k = [int(x) for x in stdin.readline().rstrip().split()]

    pileda = 0
    a = [0]
    # ai = 0
    for x in stdin.readline().rstrip().split():
        # ai += 1
        x = int(x)
        pileda += x
        a.append(pileda)
        if pileda > k:
            break
    
    piledb = 0
    b = [0]
    for x in stdin.readline().rstrip().split():
        x = int(x)
        piledb += x
        b.append(piledb)
        if piledb > k:
            break

    ans = 0
    for ai, time_a in enumerate(a):
        for bi, time_b in enumerate(b):
            if time_a + time_b > k:
                break
            if time_a + time_b <= k and ai + bi > ans:
                ans = ai + bi
    print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

from sys import stdin

def main():
    n = int(input())
    nn = n ** 2
    nnn = n ** 3
    ans = n + nn + nnn
    print(ans)
    

if __name__ == "__main__":
    main()
N = int(input())
A = list(map(int,input().split()))

nodeS = [0 for i in range(N+1)]
nodeS[0] = 1

nodeM = nodeS[0]-A[0]

laS = [0 for i in range(N+1)]

laS[-1] = A[-1]
for i in range(N):
    laS[-2-i] = A[-2-i] + laS[-1-i]


for i in range(N):
    nodeS[i+1] = nodeM*2
    nodeM = nodeS[i+1] - A[i+1]
    if nodeS[i] >= laS[i]:
        j = i
        break
    if i == N-1:
        if nodeS[i+1] >= laS[i+1]:
            print(sum(nodeS))
            exit()
        else:
            print(-1)
            exit()

for i in nodeS:
    if i < 0:
        print(-1)
        exit()
ans = sum(nodeS[:j]) + sum(laS[j::])
print(ans)




### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
if N == 0:
    print(1 if A[0] == 1 else -1)
    exit()

nodeS = [0 for i in range(N+1)]
nodeS[0] = 1

nodeM = nodeS[0]-A[0]

laS = [0 for i in range(N+1)]

laS[-1] = A[-1]
for i in range(N):
    laS[-2-i] = A[-2-i] + laS[-1-i]


for i in range(N):
    nodeS[i+1] = nodeM*2
    nodeM = nodeS[i+1] - A[i+1]
    if nodeS[i] >= laS[i]:
        j = i
        break
    if i == N-1:
        if nodeS[i+1] >= laS[i+1]:
            j = i+1
        else:
            print(-1)
            exit()

for i in nodeS:
    if i < 0:
        print(-1)
        exit()

ans = sum(nodeS[:j]) + sum(laS[j:])
print(ans)
s=input()
t=0
if s=="zyxwvutsrqponmlkjihgfedcba":
    print(-1)
else:
    r=[ord(x) for x in s]
#    print(r)
    if len(s)==26:
        while 1:
            if r[t+1]==r[t]+1:
                t+=1
                continue
            else:
              #  print(r[t+1])
                print(s[:t]+chr(min(r[t+1:])))
                break
    else:
        print(s+ chr(min(list(set(range(97,123))-set(r)))) )

### FIXED CODE ###

s = input()+"`"

for j in reversed(range(len(s))):
    sets=set(s[:j])
    for i in range(ord(s[j])+1,123):
        if chr(i) not in sets:
            print(s[:j] + chr(i))
            exit()
print(-1)
N,T = map(int, input().split())
minC = 1001
flag = False
for i in range(int(N)):
    c, t = map(int, input().split())
    if int(T) > t and minC > c:
        minC = c

print(minC)

### FIXED CODE ###

N = int(input())
if (N == 1): 
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

c = 0
for i in range(n):
      ci = 0
      ci = min(a[i],b[i])
      c += ci
      b[i] -= ci
      ci1 = 0
      ci1 = min(a[i+1],b[i])
      c += ci1
      c[i+1] -= ci1

print(c)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = 0
for i in range(len(b)):
    c_i = 0
    c_i = min(a[i], b[i])
    c += c_i
    b[i] -= c_i
    c_i_1 = 0
    c_i_1 = min(a[i+1], b[i])
    c += c_i_1
    a[i+1] -= c_i_1
print(c)
n, a, b = map(int, input().split())
if (a < b) print(0)
else print(b*(n-1)+a-a*(n-1)-b+1)


### FIXED CODE ###

n, a, b = map(int, input().split())
if (a > b) : print(0)
elif (n == 1) :
  if (a == b) : print(1)
  else : print(0)
else : print((b-a)*(n-2)+1)
import sys
from operator import itemgetter
input = sys.stdin.buffer.readline

N, K = map(int, input().split())
tds = [tuple(map(int, input().split())) for _ in range(N)]

tds.sort(key = itemgetter(1), reverse = True)

ate = {t:False for t, _ in tds}
variety = 0
deliciousness = 0
will_be_replaced = []
for t, d in tds[:K]:
    if ate[t] == False:
        ate[t] = True
        variety += 1
    else:
        will_be_replaced.append((t, d))
    deliciousness += d

max_point = deliciousness + variety ** 2

i = K
while will_be_replaced:
    t, d = will_be_replaced.pop()
    while i < N and ate[tds[i][0]]:
        i += 1
    deliciousness -= d
    deliciousness += tds[i][1]
    variety += 1
    point = deliciousness + variety ** 2
    max_point = max(max_point, point)

print(max_point)
    

### FIXED CODE ###

import sys
from operator import itemgetter
input = sys.stdin.buffer.readline

N, K = map(int, input().split())
tds = [tuple(map(int, input().split())) for _ in range(N)]

tds.sort(key = itemgetter(1), reverse = True)

ate = {t:False for t, _ in tds}
variety = 0
deliciousness = 0
will_be_replaced = []
for t, d in tds[:K]:
    if ate[t] == False:
        ate[t] = True
        variety += 1
    else:
        will_be_replaced.append((t, d))
    deliciousness += d

max_point = deliciousness + variety ** 2

i = K
while will_be_replaced:
    t, d = will_be_replaced.pop()
    while i < N:
        if ate[tds[i][0]]:
            i += 1
        else:
            ate[tds[i][0]] = True
            deliciousness -= d
            deliciousness += tds[i][1]
            variety += 1
            point = deliciousness + variety ** 2
            max_point = max(max_point, point)
            break

print(max_point)
def main(A, dp, n mod):
    if n == -1:
        return dp[0]

    if (n in A) == False: 
        dp[n] = (dp[n + 1] + dp[n + 2]) % mod
    return main(A, dp, n-1)
 
N, M = map(int, input().split())
mod = 1000000007
dp = [0] * (10**5)
A = [int(input()) for _ in range(M)] 
if (N-1 in A) == False:
    dp[N], dp[N-1] = 1, 1
else:
    dp[N] = 1
ans = main(A, dp, N-2, mod)
print(ans)


### FIXED CODE ###

N, M = map(int, input().split())
mod = 1000000007
dp = [0] * (N+2)
A = set([int(input()) for _ in range(M)]) 
dp[-2] = 1

for i in range(N-1, -1, -1):
    if (i in A) == False:
        dp[i] = (dp[i + 1] + dp[i + 2]) % mod 

print(dp[0])
#encoding utf-8

n, m = map(int, input().split())
a = [int(i)%m for i in input().split()]

count = 0
for i in range(n):
    candy = a[i]
    if candy % m == 0:
        count += 1
    for rest in range(1,n-i):
        candy += a[i+rest]
        if candy % m == 0:
            count += 1

print(count)


### FIXED CODE ###

#encoding utf-8

n, k = map(int, input().split())

if n % k == 0:
    print("0")
else:
    print("1")
n, m = map(int, input().split())
frac = [1]
for i in range(max(n, m)):
    frac.append(frac[i]*(i+1)%p)
mod = 10***9 + 7
#フェルマーの小定理を用いてcombの計算を行う
def comb(n, k, mod):
    a=frac[n]
    b=frac[k]
    c=frac[n-k]
    return (a * pow(b, mod-2, mod) * pow(c, mod-2, mod)) % mod
print(comb(n, 2, mod) + comb(m, 2, mod))

### FIXED CODE ###

n, m = map(int, input().split())
frac = [1]
p = 10**9 + 7
for i in range(max(n, m)):
    frac.append(frac[i]*(i+1)%p)

#フェルマーの小定理を用いてcombの計算を行う
def comb(n, k, mod):
    a=frac[n]
    b=frac[k]
    c=frac[n-k]
    return (a * pow(b, mod-2, mod) * pow(c, mod-2, mod)) % mod
if n >= 2:
  a = comb(n, 2, p)
else:
  a = 0
if m >= 2:
  b = comb(m, 2, p)
else:
  b = 0
print(a + b)
S=input()
S=list(S)

count=0
for i in range(len(S)//2):
  if S[i]!=S[-(i+1)]:
    count = cunt+1

print(count)


### FIXED CODE ###

S=input()
S=list(S)

count=0
for i in range(len(S)//2):
  if S[i]!=S[-(i+1)]:
    count+=1

print(count)
N, L = map(int, input().split())

sums = 0
for i in range(N):
  sums += L + i

ans = 10 ** 9
for i in range(N):
  num = L + i
  if cnt >= abs(num):
    cnt = abs(num)
    ans = sums - num

print(ans)


### FIXED CODE ###

N, L = map(int, input().split())

sums = 0
for i in range(N):
  sums += L + i

ans = 10 ** 9
cnt = 10 ** 9
for i in range(N):
  num = L + i
  if cnt >= abs(num):
    cnt = abs(num)
    ans = sums - num

print(ans)
C = A+B
D = A-B
E = A*B
print (max([C,D,E]))

### FIXED CODE ###

a, b = map(int, input().split())
c=a+b
d=a-b
e=a*b
print(max([c,d,e]))
a,b=raw_input().spilt()
a=int(a)
b=int(b)
if b-a==1:
  print "No"
else:
  print "Yes"

### FIXED CODE ###

a,b=raw_input().split()
a=int(a)
b=int(b)
if (a==2)|(b==2):
  print "No"
else:
  print "Yes"
N = int(input())
A = [int(i) for i in input().split()]

S = min(A)
L = max(A)

c = 0
B = []

if S == L:
    pass

elif abs(L) >= abs(S):
    l = A.index(L)
    if A[0] < 0:
        A[0] += L
        c += 1
        B.append((l+1, 1))
    for i in range(N-1):
        if A[i+1] >= A[i]:
            pass
        else:
            if A[i+1] < 0:
                A[i+1] += L
                c += 1
                B.append((l+1, i+2))
            A[i+1] += A[i]
            c += 1
            B.append((i+1, i+2))
            if i+1 == l:
                L = A[l]

else:
    s = A.index(S)
    if A[-1] > 0:
        A[-1] += S
        c += 1
        B.append((s+1, N))
    for i in range(N-1):
        if A[-i-2] <= A[-i-1]:
            pass
        else:
            if A[-i-2] > 0:
                A[-i-2] += S
                c += 1
                B.append(s+1, N-i-1)
            A[-i-2] += A[-i-1]
            c += 1
            B.append((N-i, N-i-1))
            if N-i-1 == s:
                S = A[s]


if c == 0:
    print(c)
else:
    print(c)
    for i in range(c):
        print(B[i][0], B[i][1])


### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]

S = min(A)
L = max(A)

c = 0
B = []

if S == L:
    pass

elif S >= 0 and L > 0:
    for i in range(N-1):
        if A[i+1] >= A[i]:
            pass
        else:
            A[i+1] += A[i]
            c += 1
            B.append((i+1, i+2))

elif L <= 0 and S < 0:
    for i in range(N-1):
        if A[-i-2] <= A[-i-1]:
            pass
        else:
            A[-i-2] += A[-i-1]
            c += 1
            B.append((N-i, N-i-1))

else:
    if L >= -S:
        l = A.index(L)
        if A[0] < 0:
            A[0] += L
            c += 1
            B.append((l+1, 1))
        for i in range(N-1):
            if A[i+1] >= A[i]:
                pass
            else:
                if A[i+1] < 0:
                    A[i+1] += L
                    c += 1
                    B.append((l+1, i+2))
                A[i+1] += A[i]
                c += 1
                B.append((i+1, i+2))
                if i+1 == l:
                    L = A[l]
    else:
        s = A.index(S)
        if A[-1] > 0:
            A[-1] += S
            c += 1
            B.append((s+1, N))
        for i in range(N-1):
            if A[-i-2] <= A[-i-1]:
                pass
            else:
                if A[-i-2] > 0:
                    A[-i-2] += S
                    c += 1
                    B.append((s+1, N-i-1))
                A[-i-2] += A[-i-1]
                c += 1
                B.append((N-i, N-i-1))
                if -i-2 == s:
                    S = A[s]

if c == 0:
    print(c)
else:
    print(c)
    for i in range(c):
        print(B[i][0], B[i][1])
n = int(input())
d = list(map(int, input().split()))
print(d[sorted(d)//2]-d[sorted(d)//2-1])

### FIXED CODE ###

n = int(input())
d = list(map(int, input().split()))
print(sorted(d)[n//2]-sorted(d)[n//2-1])
def lcm(a,b):
    return a*b//gcd(a,b)

def su(a,b,c,d):
    count = 0
    for _ in range(a//c, (b+1)//c):
        count += 1
    for _ in range(a//d, (b+1)//d):
        count += 1
    for _ in range(a//lcm(c,d), (b+1)//lcm(c,d)):
        count -= 1

    print(b+1-a-count)
    
def main():
    a,b,c,d = map(int,input().split())
    su(a,b,c,d)
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

def lcm(a,b):
    ab = a*b
    while b != 0:
        a, b = b, a%b
    return ab //a

def su(n,c,d):
    return n - n//c - n//d + n//lcm(c,d)
    
def main():
    a,b,c,d = map(int,input().split())
    print(su(b,c,d) - su(a-1,c,d))
    
if __name__ == '__main__':
    main()
s = input()
if s = "ABC":
  print("ARC")
else:
  print("ABC")

### FIXED CODE ###

s = input()
if s == "ABC":
  print("ARC")
else:
  print("ABC")
N = int(input())
A = list(map(int,input.split()))

ans = [0]*N

for i in A:
    ans[i-1] += 1

for j in ans:
    print(j)


### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))

ans = [0]*N

for i in A:
    ans[i-1] += 1

for j in ans:
    print(j)
H, W = [int(a) for a in input().split()]
S = [None] * H
for i in range(H):
    S[i] = input()

L = [[0 for _ in range(W)] for _ in range(H)]
R = [[0 for _ in range(W)] for _ in range(H)]
U = [[0 for _ in range(W)] for _ in range(H)]
D = [[0 for _ in range(W)] for _ in range(H)]

ans = 0

for i in range(H):
    for j in range(W):
        # Uを求める
        if S[i][j] == '#':  pass  # Uは0で初期化されている
        elif i == 0:        U[i][j] = 1
        else:               U[i][j] = U[i - 1][j] + 1

        # Dを求める
        if S[H - 1 - i][j] == '#':  pass
        elif i == 0:    D[i][j] = 1
        else:           D[i][j] = D[i + 1][j] + 1

        # Lを求める
        if S[i][j] == '#':  pass
        elif j == 0:  L[i][j] = 1
        else:       L[i][j] = L[i][j - 1] + 1

        # Rを求める
        if S[i][W - 1 - j] == '#':  pass
        elif j == 0:    R[i][W - 1 - j] = 1
        else:           R[i][W - 1 - j] = R[i][W - j] + 1

        ans = max(ans, L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3)
        
print(ans)

### FIXED CODE ###

H, W = [int(a) for a in input().split()]
S = [None] * H
for i in range(H):
    S[i] = input()

L = [[0 for _ in range(W)] for _ in range(H)]
R = [[0 for _ in range(W)] for _ in range(H)]
U = [[0 for _ in range(W)] for _ in range(H)]
D = [[0 for _ in range(W)] for _ in range(H)]

ans = 0

# L, R, Uを求める
for i in range(H):
    for j in range(W):

        if S[i][j] == '#':
            pass  # L, R, Uは0で初期化されている
        else:
            # Uを求める
            if i == 0:  U[i][j] = 1
            else:       U[i][j] = U[i - 1][j] + 1

            # Lを求める
            if j == 0:  L[i][j] = 1
            else:       L[i][j] = L[i][j - 1] + 1

        # Rを求める
        if S[i][W - 1 - j] == '#':
            pass
        elif j == 0:
            R[i][W - 1 - j] = 1
        else:
            R[i][W - 1 - j] = R[i][W - j] + 1

# Dを求める
for i in range(H - 1, -1, -1):
    for j in range(W):
        if S[i][j] == '#':  pass
        elif i == H - 1:    D[i][j] = 1
        else:               D[i][j] = D[i + 1][j] + 1
        ans = max(ans, L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3)

print(ans)
x, N = int(input().split())
p = list(map(int, input().split()))

min =10000
temp = 0

for i in range(-1000, 1000):
  temp = abs(X - i)
  
  if temp < min and i not in p:
    min = temp
    
print(min)


### FIXED CODE ###

x, N = map(int, input().split())
p = list(map(int, input().split()))

min =10000
temp = 0
num = 10000

for i in range(-1000, 1000):
  temp = abs(x- i)
  
  if temp < min and i not in p:
    min = temp
    num = i
    
print(num)
N,X=map(int,input().split())
L=list(map(int,input().split()))
bound=1
D=0
for i in range(N+1):
  D+=L[i]
  if D<=X:
    bound+=1
  else:
    break;
print(bound)

### FIXED CODE ###

N,X=map(int,input().split())
L=list(map(int,input().split() ) )
bound=1
D=0
for n in L:
  D+=n
  if D<=X:
    bound+=1
  else:
    break
print(bound)
n,h,w = map(int,input().split())
print((n-h+1)*(n-w+1))

### FIXED CODE ###

n = int(input())
h = int(input())
w = int(input())
print((n-h+1)*(n-w+1))
import collections
from copy import deepcopy

n,a,b,c=map(int,input().split())
arr=[int(input()) for _ in range(n)]
l=collections.deque()
l.append([[],[],[]])
cnt=0

while 1:
  if cnt==8:
    break
  base=l.popleft()
  if len(base[0])==0 and len(base[1])==0 and len(base[2])==0:
    l.append([[arr[cnt]],[],[]])
    l.append([[],[arr[cnt]],[]])
    l.append([[],[],[arr[cnt]]])
    l.append([[],[],[]])
    cnt+=1
  else:
    tmp1=deepcopy(base)
    tmp1[0].append(arr[cnt])
    l.append(tmp1)
    tmp2=deepcopy(base)
    tmp2[1].append(arr[cnt])
    l.append(tmp2)
    tmp3=deepcopy(base)
    tmp3[2].append(arr[cnt])
    l.append(tmp3)
    tmp4=deepcopy(base)
    l.append(tmp4)

mincost=10**9
for bl in l:
  if len(bl[0])==0 or len(bl[1])==0 or len(bl[2])==0:
    continue
  else:
    tmpcost=abs(sum(bl[0])-a)+abs(sum(bl[1])-b)+abs(sum(bl[2])-c)+10*(len(bl[0])-1+len(bl[1])-1+len(bl[2])-1)
    if mincost>tmpcost:
      mincost=tmpcost
print(mincost)

### FIXED CODE ###

import collections
from copy import deepcopy

n,a,b,c=map(int,input().split())
arr=[int(input()) for _ in range(n)]
l=collections.deque()
l.append([[],[],[]])
cnt=0

while 1:
  if cnt==n:
    break
  base=l.popleft()
  if len(base[0])==0 and len(base[1])==0 and len(base[2])==0:
    l.append([[arr[cnt]],[],[]])
    l.append([[],[arr[cnt]],[]])
    l.append([[],[],[arr[cnt]]])
    l.append([[],[],[]])
    cnt+=1
  else:
    tmp1=deepcopy(base)
    tmp1[0].append(arr[cnt])
    l.append(tmp1)
    tmp2=deepcopy(base)
    tmp2[1].append(arr[cnt])
    l.append(tmp2)
    tmp3=deepcopy(base)
    tmp3[2].append(arr[cnt])
    l.append(tmp3)
    tmp4=deepcopy(base)
    l.append(tmp4)

mincost=10**9
for bl in l:
  if len(bl[0])==0 or len(bl[1])==0 or len(bl[2])==0:
    continue
  else:
    tmpcost=abs(sum(bl[0])-a)+abs(sum(bl[1])-b)+abs(sum(bl[2])-c)+10*(len(bl[0])-1+len(bl[1])-1+len(bl[2])-1)
    if mincost>tmpcost:
      mincost=tmpcost
print(mincost)
import sys
def datasets(n):
    for i in range(n)
        type, rank = raw_input().split()
        yield type, rank

db = { 'S' : [False] * 13,
       'H' : [False] * 13,
       'C' : [False] * 13,
       'D' : [False] * 13 }

n = int(raw_input())
for type, rank in datasets(n):
    db[type][rank-1] = True

for type in db:
    count = 0
    for card in db[type]:
        if not db[type][card]:
            count += 1
    print type, count

### FIXED CODE ###

def datasets(n):
    for i in range(n):
        type, rank = raw_input().split()
        yield type, rank
db = {'S' : [False] * 13,
      'H' : [False] * 13,
      'C' : [False] * 13,
      'D' : [False] * 13 }

n = int(raw_input())

for type, rank in datasets(n):
    db[type][int(rank)-1] = True

for type in ['S', 'H', 'C', 'D']:
    for num, card in enumerate(db[type]):
        if card == False:
            print type, (num+1)
a,b = map(double,raw_input().split())

print "%d %d %f" %(a/b, a%b, a/b)

### FIXED CODE ###

a,b = map(int,raw_input().split())

print "%d %d %f" %(a/b, a%b, float(a)/b)
from math import factorial
 
s = int(input())
 
ans = 0
for i in range(s // 3):
    box = i + 1  # 箱の数
    ball = s - 3 * box # あらかじめ箱に３こずつ入れたあとの残りの玉の数
 
　　# 箱の入れ方が何通りあるか計算。
    # 割り算を // ではなく / とするとfloat型の計算となりオーバーフローする可能性がある。
    # factorial(s_ + i) // (factorial(s_) * factorial(i))ではなくfactorial(s_ + i) // (factorial(s_) // factorial(i))としても同様にオーバーフローする可能性がある。
    ans += factorial(ball + box - 1) // (factorial(ball) * factorial(box - 1)) % (10**9 + 7)
print(ans)

### FIXED CODE ###

s = int(input())

x = s // 3

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

ans = 0
for i in range(x):
    Box = i + 1
    Nokori = s - 3 * Box
    ans_ = cmb(Nokori + Box - 1, Box - 1) 
    ans += ans_
print(ans % (10 ** 9 + 7))
n=int(input())
boo=[0 for i in range(10**5+1)]
boo[100]=1
boo[101]=1
boo[102]=1
boo[103]=1
boo[104]=1
boo[105]=1
for i in range(100,n+1):
  if boo[i]==1:
    for j in range(6):
      boo[i+100+j]=1
if boo[n]:
  print(1)
else:
  print(0)


### FIXED CODE ###

n=int(input())
#下２桁を実現させる最小個数を考えよう
l=[0]
for i in range(1,100):
  num=i
  l.append((num-1)//5+1)
w=str(n)
if n<100:
  print(0)
else:
  num=int(w[-2]+w[-1])
  index=l[num]
  if n<index*100+num:
    print(0)
  else:
    print(1)
a = []
for i in range(0,4):
  a.append(input())
k =int(input())
if k <= (a[4] - a[0]):
  print(Yay!)
else:
  print(:()
  


### FIXED CODE ###

a = []
for i in range(5):
  a.append(int(input()))
  
k =int(input())
if k >= (a[4] - a[0]):
  print('Yay!')
else:
  print(':(')
N = int(input())
arr = map(int, input().split())
for i in range(N//2, 0, -1):
  arr[i] = sum(arr[i::i]) % 2
ans = [i for i, j in enumerate(arr) if j == 1]
print(len(ans))
print(*ans)


### FIXED CODE ###

def main():
    n = int(input())
    A = [0] + list(map(int, input().rstrip().split()))
    for i in range(n // 2, 0, -1):  # second half: no multiples
        A[i] = sum(A[i::i]) % 2
    ans = [i for i, j in enumerate(A) if j]
    print(len(ans))  # all cells: [1] -> len() (much faster than sum())
    print(*ans)


if __name__ == "__main__":
    main()
R=int(input())

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

### FIXED CODE ###

R=int(input())

if 1200>R:
  print('ABC')
elif 2800>R:
  print('ARC')
else:
  print('AGC')
a,b,k=map(int,input().split())
l,s=0
N=""
while s < k:
    l += 1
    if a%(l+1)==0 and b%(l+1)==0:
            s += 1
            N.append(l)
N.reverse()
print(N[k-1])

### FIXED CODE ###

a,b,k=map(int,input().split())
N=[]
for i in range(1,min(a,b)+1):
    if (a%i==0 and b%i==0):
            N.append(i)
N.reverse()
print(N[k-1])