#include <bits/stdc++.h>
using namespace std;

int main() {
  const string c[] = { "black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white" };
  const int t[][3] = { {0, 0, 0}, { 0, 0, 255}, {0, 255, 0}, {0, 255, 255}, {255 ,0, 0},
                       {255, 0, 255}, {255, 255, 0}, {255, 255, 255} };
  string s;
  while (cin >> s, s != "0") {
    int r = stoi(s.substr(1, 2), nullptr, 16);
    int g = stoi(s.substr(3, 2), nullptr, 16);
    int b = stoi(s.substr(5, 2), nullptr, 16);
    double mind = 500.0;
    int idx = -1;
    for (int i = 0; i < 8; i++) {
      double d = sqrt(pow(t[i][0] - r, 2) + pow(t[i][1] - g, 2) + pow(t[i][2] - b, 2));
      if (d < mind) {
        mind = d;
        idx = i;
      }
    }
    cout << c[idx] << "\n";
  }
}
