#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
long long mod = 1000000007;
vector<long long> grev[200001];
long long a[200005];
long long b[200005];
void solve() {
  string s;
  cin >> s;
  long long n = ((int)s.length());
  long long sum = 0, even = 0, zeroes = 0;
  for (long long i = int(0); i < int(n); i++) {
    if (s[i] == '0')
      zeroes++;
    else if ((s[i] - '0') % 2 == 0)
      even++;
    sum += s[i] - '0';
  }
  long long pos = 0;
  if (sum % 3 == 0) {
    if (even) {
      if (zeroes > 0) pos = 1;
    } else if (zeroes > 1)
      pos = 1;
  }
  cout << (pos ? "red" : "cyan") << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
