#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
double eps = 1e-12;
void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int solve() {
  string s;
  cin >> s;
  string s1 = s;
  long long flag1 = 0, flag2 = 0, flag3 = 0;
  long long sum = 0;
  for (int i = 0; i < s1.length(); ++i) {
    int a = s1[i] - '0';
    if ((!(a & 1)) && (a != 0)) {
      flag1 = 1;
    }
    if (s1[i] == '0') {
      flag2 += 1;
    }
    sum += a;
  }
  if (sum % 3 == 0) {
    flag3 = 1;
  }
  if ((flag3 == 1 && flag1 == 1 && flag2 >= 1) || sum == 0 ||
      (flag3 == 1 && flag1 == 0 && flag2 > 1)) {
    cout << "red\n";
  } else {
    cout << "cyan\n";
  }
  return 0;
}
int main() {
  fast_io();
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
