#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    string color[] = {"black", "blue", "lime", "aqua", "red", "fuchsia", "yellow", "white"};

    for(;;){
        string s;
        cin >> s;
        if(s == "0")
            return 0;

        int a[3] = {0};
        for(int i=0; i<6; ++i){
            a[i/2] *= 16;
            if('0' <= s[i+1] && s[i+1] <= '9')
                a[i/2] += s[i+1] - '0';
            else
                a[i/2] += s[i+1] - 'a' + 10;
        }

        int k;
        int minD = INT_MAX;
        for(int i=0; i<8; ++i){
            int d = 0;
            for(int j=0; j<3; ++j){
                if(i & (1<<(2-j)))
                    d += (255 - a[j]) * (255 - a[j]);
                else
                    d += a[j] * a[j];
            }
            if(d < minD){
                minD = d;
                k = i;
            }
        }

        cout << color[k] << endl;
    }
}