#include <iostream>

using namespace std;


int main(int argc, const char * argv[]) {
    
    while (true) {
        string input;
        cin >> input;
        if(input == "0"){
            break;
        }
        
/*        for(int i=1;i<7;i++){
            input[i] = toupper(input[i]);
        }
*/
        int red = stoi(input.substr(1,2), nullptr, 16);
        int green = stoi(input.substr(3,2), nullptr, 16);
        int blue = stoi(input.substr(5,2), nullptr, 16);
        
        
        red = (red < 128) ? 0 : 255;
        green = (green < 128) ? 0 : 255;
        blue = (blue < 128) ? 0 : 255;
        
        if(red == 0){
            if(green == 0){
                if(blue == 0){
                    cout << "black" << endl;
                }
                else{
                    cout << "blue" << endl;
                }
                
            }
            else{
                if(blue == 0){
                    cout << "lime" << endl;
                }
                else{
                    cout << "aqua" << endl;
                }
            }
        }
        else{
            if(green == 0){
                if(blue == 0){
                    cout << "red" << endl;
                }
                else{
                    cout << "fuchsia" << endl;
                }
                
            }
            else{
                if(blue == 0){
                    cout << "yellow" << endl;
                }
                else{
                    cout << "white" << endl;
                }
            }
        }
        
    }
    
    return 0;
}