#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    string s;
    cin >> s;
    bool b = true, b1 = false, b2 = true, b3 = false;
    int sum = 0;
    for (int i = 0; i < s.size(); i++) {
      sum += (int)s[i] - 48;
      int x = (int)s[i] - 48;
      if (x % 2 == 0) {
        if (x != 0) b3 = true;
        if (x == 0 && b2 == false) b3 = true;
      }
      if (s[i] == '0' && b2) {
        b1 = true;
        b2 = false;
      }
    }
    if (sum % 3 == 0 && b1 && b3)
      cout << "red" << endl;
    else
      cout << "cyan" << endl;
  }
}
