#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.141592653;
const long long mod = 1e9 + 7;
const long long N = 6e6 + 1;
const int big = 1e9 + 1;
const long long INF = 1e18 + 1;
int n;
string solve(string s) {
  string ans = "red", bns = "cyan";
  int sum = 0;
  for (int i = 0; i < s.size(); ++i) {
    sum += s[i] - '0';
  }
  if (sum % 3 == 0) {
    for (int i = 0; i < s.size(); ++i) {
      if (s[i] == '0') {
        for (int j = 0; j < s.size(); ++j) {
          if (j != i)
            if (s[j] == '0' || s[j] == '4' || s[j] == '8' || s[j] == '2' ||
                s[j] == '6')
              return ans;
        }
      }
    }
  }
  return bns;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  while (n--) {
    string s;
    cin >> s;
    cout << solve(s) << endl;
  }
}
