#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  while (n--) {
    string s;
    cin >> s;
    bool by2 = false, by10 = false;
    bool hasZero = false;
    for (int i = 0; i < s.length(); ++i) {
      if (s[i] == '0') {
        by10 = true;
        hasZero = true;
        break;
      }
    }
    if (!hasZero) {
      cout << "cyan\n";
      continue;
    }
    for (int i = 0; i < s.length(); ++i) {
      if (s[i] == '2' || s[i] == '4' || s[i] == '6' || s[i] == '8') {
        by2 = true;
        break;
      }
    }
    int digiSum = 0;
    for (int i = 0; i < s.length(); ++i) digiSum += s[i] - '0';
    if (digiSum == 0) {
      cout << "red\n";
      continue;
    }
    bool by4 = false;
    for (int i = 0; i < s.length(); ++i) {
      for (int j = i + 1; j < s.length(); ++j) {
        int x = (s[i] - '0') * 10 + s[j] - '0';
        int y = (s[j] - '0') * 10 + s[i] - '0';
        if (x % 4 == 0 || y % 4 == 0) {
          by4 = true;
          break;
        }
      }
      if (by4) break;
    }
    if (!by4) {
      cout << "cyan\n";
      continue;
    }
    if (digiSum % 3 == 0 && (by2 || hasZero))
      cout << "red\n";
    else
      cout << "cyan\n";
  }
  return 0;
}
