Bob is a competitive programmer. He wants to become red, and for that he needs a strict training regime. He went to the annual meeting of grandmasters and asked $n$ of them how much effort they needed to reach red.

"Oh, I just spent $x_i$ hours solving problems", said the $i$-th of them. 

Bob wants to train his math skills, so for each answer he wrote down the number of minutes ($60 \cdot x_i$), thanked the grandmasters and went home. Bob could write numbers with leading zeroes — for example, if some grandmaster answered that he had spent $2$ hours, Bob could write $000120$ instead of $120$.

Alice wanted to tease Bob and so she took the numbers Bob wrote down, and for each of them she did one of the following independently:   rearranged its digits, or  wrote a random number. 

This way, Alice generated $n$ numbers, denoted $y_1$, ..., $y_n$.

For each of the numbers, help Bob determine whether $y_i$ can be a permutation of a number divisible by $60$ (possibly with leading zeroes).


-----Input-----

The first line contains a single integer $n$ ($1 \leq n \leq 418$) — the number of grandmasters Bob asked.

Then $n$ lines follow, the $i$-th of which contains a single integer $y_i$ — the number that Alice wrote down.

Each of these numbers has between $2$ and $100$ digits '0' through '9'. They can contain leading zeroes.


-----Output-----

Output $n$ lines.

For each $i$, output the following. If it is possible to rearrange the digits of $y_i$ such that the resulting number is divisible by $60$, output "red" (quotes for clarity). Otherwise, output "cyan".


-----Example-----
Input
6
603
006
205
228
1053
0000000000000000000000000000000000000000000000

Output
red
red
cyan
cyan
cyan
red



-----Note-----

In the first example, there is one rearrangement that yields a number divisible by $60$, and that is $360$.

In the second example, there are two solutions. One is $060$ and the second is $600$.

In the third example, there are $6$ possible rearrangments: $025$, $052$, $205$, $250$, $502$, $520$. None of these numbers is divisible by $60$.

In the fourth example, there are $3$ rearrangements: $228$, $282$, $822$.

In the fifth example, none of the $24$ rearrangements result in a number divisible by $60$.

In the sixth example, note that $000\dots0$ is a valid solution.

Difficulty: interview

Starter code:

Solutions:
n=int(input())
for i in range(n):
    s=list(input())
    s=[int(i) for i in s]
    try:
        s.remove(0)
        x=sum(s)
        if x%3==0:
            if len([i for i in s if i%2==0])>0:
                print("red")
            else:
                print("cyan")
        else:
            print("cyan")
    except:
        print("cyan")




N = int(input())

for x in range(N):
    a = input()
    s = 0
    for i in a:
        s += int(i)
    
    d4 = False
    for i in range(len(a)):
        for j in range(len(a)):
            if i==j: continue
            if ( int(a[i])*10 + int(a[j]) )%20 == 0:
                d4 = True
    
    if s%3==0 and d4: print('red')
    else:  print('cyan')

n = int(input())

for _ in range(n):
	s = input()

	if s.count('0') and sum(map(int, s)) % 3 == 0 and sum(int(c) % 2 == 0 for c in s) > 1:
		print("red")
	else:
		print("cyan")

n=int(input())

for i in range(n):

    a=(input())

    zeroes=0
    evens=0
    summ=0

    for b in a:
        if int(b)%2 == 0: evens+=1
        if int(b)==0: zeroes+=1
        summ += int(b)

    if zeroes>0 and evens>1 and summ%3==0: print('red')
    else: print('cyan')


n = int(input())
for q in range(n):
    a = input()
    if sum([int(q) for q in a]) % 3 != 0:
        print('cyan')
    elif a.count('0') == 0:
        print('cyan')
    else:
        w = a.find('0')
        a = a[:w]+a[w+1:]
        if any(q in ['0', '2', '4', '6', '8'] for q in a):
            print('red')
        else:
            print('cyan')


n = int(input())

for qwe in range(n):
	a = list(sorted(list(map(int, input()))))
	if sum(a) % 3 == 0 and a[0] == 0 and (0 in a[1:] or 2 in a[1:] or 4 in a[1:] or 6 in a[1:] or 8 in a[1:]):
		print('red')
	else:
		print('cyan')

for __ in range(int(input())):
    n = list(input())
    num = 0
    for elem in n:
        num += int(elem)
    if '0' in n and num % 3 == 0 and ('2' in n or '4' in n or '6' in n or '8' in n or n.count('0') >= 2):
        print('red')
    else:
        print('cyan')

n = int(input())
for i in range(n):
    x = input()
    hasz, hasd, ans = 0, 0, 0
    for b in x:
        a = int(b)
        if a == 0:
            hasz += 1
        if a%2 == 0:
            hasd += 1
        ans += a
    if hasz:
        hasd -= 1
    if hasz and hasd and ans%3 == 0:
        print('red')
    else:
        print('cyan')