#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <tuple>

int tsurai(int r, int g, int b) {
  return r*r + g*g + b*b;
}

int testcase_ends() {
  char c;
  scanf(" %c", &c);
  if (c == '0') return 1;

  int r, g, b;
  scanf("%2x%2x%2x", &r, &g, &b);

  std::vector<std::pair<std::string, std::tuple<int, int, int>>> col;
  int f = 255;
  
  col.emplace_back("black", std::make_tuple(0, 0, 0));
  col.emplace_back("blue", std::make_tuple(0, 0, f));
  col.emplace_back("lime", std::make_tuple(0, f, 0));
  col.emplace_back("aqua", std::make_tuple(0, f, f));
  col.emplace_back("red", std::make_tuple(f, 0, 0));
  col.emplace_back("fuchsia", std::make_tuple(f, 0, f));
  col.emplace_back("yellow", std::make_tuple(f, f, 0));
  col.emplace_back("white", std::make_tuple(f, f, f));

  int d = 1e9;
  std::string res;
  for (auto const& p: col) {
    std::string cur;
    std::tuple<int, int, int> rgb;
    std::tie(cur, rgb) = p;
    int r0, g0, b0;
    std::tie(r0, g0, b0) = rgb;

    int cur_d = tsurai(r0-r, g0-g, b0-b);
    if (d > cur_d) {
      d = cur_d;
      res = cur;
    }
  }
  printf("%s\n", res.c_str());
  return 0;
}

int main() {
  while (!testcase_ends()) {}
}

