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

inline ll digit(char c) {
    return '0' <= c && c <= '9' ? c - '0' : c - 'a' + 10;
}

int main() {

    vector<string> clr = {"black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white"};
    vector<vector<ll>> clrv = {
        {0, 0, 0},
        {0, 0, 0xff},
        {0, 0xff, 0},
        {0, 0xff, 0xff},
        {0xff, 0, 0},
        {0xff, 0, 0xff},
        {0xff, 0xff, 0},
        {0xff, 0xff, 0xff}
    };

    string cl;
    while (cin >> cl, cl != "0") {

        ll r = digit(cl[1]) * 16 + digit(cl[2]);
        ll g = digit(cl[3]) * 16 + digit(cl[4]);
        ll b = digit(cl[5]) * 16 + digit(cl[6]);

        ll d2min = 0x7FFFFFFFFFFFFFFFLL, did = -1;
        for (ll i = 8; i--; ) {
            ll dr = clrv[i][0] - r;
            ll dg = clrv[i][1] - g;
            ll db = clrv[i][2] - b;
            ll d2 = dr*dr + dg*dg + db*db;
            if (d2min > d2) {
                d2min = d2;
                did = i;
            }
        }
        cout << clr[did] << "\n";
        
    }

}
