#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  string s;
  cin >> t;
  while (t--) {
    cin >> s;
    bool par = 0, zero = 0;
    long long sum = 0;
    sort(s.rbegin(), s.rend());
    if (s.back() == '0') {
      s.pop_back();
      zero = 1;
    }
    for (auto &c : s) {
      int cc = c - '0';
      par |= (cc % 2 == 0);
      sum += (int)c - '0';
    }
    if (par and sum % 3 == 0 and zero)
      cout << "red" << endl;
    else
      cout << "cyan" << endl;
  }
  return 0;
}
