#include <bits/stdc++.h>
using namespace std;
int T;
char s[100100];
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%s", s + 1);
    int len = strlen(s + 1);
    int ss = 0;
    int f = 0, g = 0;
    for (int i = 1; i <= len; i++) {
      if (s[i] == '0' and g) {
        f = 1;
      }
      if (s[i] == '0' and !g) {
        g = 1;
      }
      if (s[i] != '0' and (s[i] - '0') % 2 == 0) {
        f = 1;
      }
      ss += s[i] - '0';
    }
    if (ss % 3 == 0 and f and g)
      puts("red");
    else
      puts("cyan");
  }
  return 0;
}
