#include <stdio.h>

const char *t[] = {"black","blue","lime","aqua","red","fuchsia","yellow","white"};

int solve(int r, int g, int b){
    int min = 0; int mind = 200000;
    for(int i = 0; i < 8; i++){
        int r0 = ((i>>2)&1)*0xff, g0 = ((i>>1)&1)*0xff, b0 = ((i>>0)&1)*0xff;
        //pf("%d,%d,%d : %d,%d,%d\n", r,g,b,r0,g0,b0);
        int d = (r-r0)*(r-r0)+(g-g0)*(g-g0)+(b-b0)*(b-b0);
        if(mind > d){
            mind = d, min = i;
        }
    }
    if(min >= 8) throw;
    return min;
}

int main(){
    int n;
    char buf[16];
    while(fgets(buf,sizeof(buf),stdin)){
        if(buf[0] == '0') break;
        sscanf(buf+1,"%x",&n);
        int i = solve((n>>16)&0xff,(n>>8)&0xff,n&0xff);
        printf("%s\n", t[i]);
    }
    return 0;
}