#include <bits/stdc++.h>
using namespace std;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
const int INF = (int)1e9 + 1;
const long long LINF = (long long)1e18 + 1;
template <typename T1, typename T2>
std::istream &operator>>(std::istream &in, pair<T1, T2> &oth) {
  in >> oth.first >> oth.second;
  return in;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &out, const pair<T1, T2> &oth) {
  out << oth.first << ' ' << oth.second;
  return out;
}
template <typename T>
std::istream &operator>>(std::istream &in, std::vector<T> &v) {
  for (auto &now : v) in >> now;
  return in;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::vector<T> &v) {
  for (auto &now : v) out << now << ' ';
  out << "\n";
  return out;
}
template <typename T>
std::ostream &operator<<(std::ostream &out, const std::set<T> &v) {
  for (auto &now : v) out << now << ' ';
  out << "\n";
  return out;
}
void get_time() { cout << 1. * clock() / CLOCKS_PER_SEC << endl; }
template <typename T>
T Myceil(T a, T b) {
  return (a + b - 1) / b;
}
template <typename T1, typename T2>
T1 max(T1 a, T2 b) {
  return a > b ? a : b;
}
template <typename T1, typename T2>
T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
template <typename T1, typename T2>
T1 gcd(T1 a, T2 b) {
  while (a && b) {
    if (a > b)
      a %= b;
    else
      b %= a;
  }
  return a + b;
}
template <typename T1>
T1 bpow(T1 a, long long n, long long mod) {
  a %= mod;
  T1 res = 1;
  while (n) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
struct pairhash {
  template <typename T, typename U>
  std::size_t operator()(const std::pair<T, U> &x) const {
    return std::hash<T>()(x.first) ^ std::hash<U>()(x.second);
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    long long sum = 0;
    bool ok = false;
    for (auto now : s) {
      sum += now - '0';
    }
    if (sum % 3 == 0) {
      if (count(s.begin(), s.end(), '0') >= 2) {
        ok = true;
      }
      for (int i = 4; i < 100; i += 4) {
        int a = i / 10;
        int b = i % 10;
        if (b != 0 && b != 5) {
          continue;
        }
        if (a == b) {
          if (count(s.begin(), s.end(), a + '0') >= 2) {
            ok = true;
          }
        } else if (s.find(a + '0') != -1 && s.find(b + '0') != -1) {
          ok = true;
        }
      }
    }
    if (ok)
      cout << "red\n";
    else
      cout << "cyan\n";
  }
  return 0;
}
