#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    int tot = 0;
    int evens[5];
    memset(evens, 0, sizeof evens);
    for (int j = 0; j < s.size(); j++) {
      int temp = s[j] - '0';
      tot += temp;
      if (temp % 2 == 0) evens[temp / 2]++;
    }
    bool ok =
        (evens[0] > 1 or (evens[0] == 1 and
                          ((evens[1] + evens[2] + evens[3] + evens[4]) >= 1)));
    if (tot % 3 == 0 and ok)
      cout << "red" << endl;
    else
      cout << "cyan" << endl;
  }
  return 0;
}
