// clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

tuple<int, int, int> toCol(string s) {
  int x;
  stringstream ss;
  ss << hex << s;
  ss >> x;
  return mt(x / 65536, x / 256 % 256, x % 256);
}

void solve() {
  vector<pair<string, string>> t = {
    {"black", "000000"},
    {"blue", "0000ff"},
    {"lime", "00ff00"},
    {"aqua", "00ffff"},
    {"red", "ff0000"},
    {"fuchsia", "ff00ff"},
    {"yellow", "ffff00"},
    {"white", "ffffff"},
  };
  char gomi;
  string s;
  while (cin >> gomi >> s) {
    int r, g, b;
    tie(r, g, b) = toCol(s);
    vector<pair<int, string>> v;
    for (auto &p : t) {
      int _r, _g, _b;
      tie(_r, _g, _b) = toCol(p.se);
      int d = (r - _r) * (r - _r) + (g - _g) * (g - _g) + (b - _b) * (b - _b);
      v.emplace_back(d, p.fi);
    }
    cout << (*min_element(all(v))).se << endl;
  }
}