#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  long long int t;
  cin >> t;
  while (t--) {
    string s;
    cin >> s;
    int n = s.size();
    int i = n - 1;
    int even = 0, sum = 0, f5 = 0;
    while (n > 0) {
      int l = (int)s[i] - 48;
      sum = sum + l;
      if (l == 0) f5++;
      if (l % 2 == 0) even++;
      n--;
      i--;
    }
    if (sum % 3 == 0 && (f5 > 0 && even - 1 > 0))
      cout << "red\n";
    else
      cout << "cyan\n";
  }
  return 0;
}
