#include <bits/stdc++.h>
using namespace std;
int n;
string str;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> str;
    bool f0 = 0;
    bool f2 = 0;
    bool f3 = 0;
    int sum = 0;
    int cnt = 0;
    for (int j = 0; j < str.size(); j++) {
      if ((str[j] - '0') == 0) {
        f0 = 1;
        cnt++;
      } else if (((str[j] - '0') % 2 == 0) && ((str[j] - '0') != 0))
        f2 = 1;
      sum += (str[j] - '0');
    }
    if (sum % 3 == 0) f3 = 1;
    if (cnt > 1) f2 = 1;
    if ((f0 && f2 && f3) || (cnt == str.size()))
      cout << "red\n";
    else
      cout << "cyan\n";
  }
}
