#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, cnt[10], a, b;
  string s;
  cin >> n;
  while (n--) {
    cin >> s;
    memset(cnt, 0, sizeof(cnt));
    for (auto c : s) cnt[c - '0'] += 1;
    if (!cnt[0]) {
      cout << "cyan" << endl;
      continue;
    }
    cnt[0] -= 1;
    a = b = 0;
    for (int i = (0); i < (10); i++)
      a += cnt[i] * i, b += (i % 2 == 0) * cnt[i];
    if (a == 0) {
      cout << "red" << endl;
      continue;
    }
    if (a % 3 == 0 && b > 0)
      cout << "red" << endl;
    else
      cout << "cyan" << endl;
  }
}
