#include <stdio.h>
#include <stack>
#include <math.h>

using namespace std;

int translate(char ch){
	if(ch >= '0' && ch <= '9')return ch - '0';
	else{
		return 10 + ch - 'a';
	}
}

int main(){

	char buf[10];
	int red,green,blue,diff[8],min,min_index;

	while(true){
		scanf("%s",buf);
		if(buf[0] == '0')break;

		red = 16*translate(buf[1])+translate(buf[2]);
		green = 16*translate(buf[3])+translate(buf[4]);
		blue = 16*translate(buf[5])+translate(buf[6]);

		diff[0] = red*red + green*green + blue*blue; //black
		diff[1] = red*red + green*green + (blue-255)*(blue-255); //blue
		diff[2] = red*red + (green-255)*(green-255) + blue*blue; //lime
		diff[3] = red*red + (green-255)*(green-255) + (blue-255)*(blue-255); //aqua
		diff[4] = (red-255)*(red-255) + green*green + blue*blue; //red
		diff[5] = (red-255)*(red-255) + green*green +(blue-255)*(blue-255); //fuchsia
		diff[6] = (red-255)*(red-255) + (green-255)*(green-255) + blue*blue; //fuchsia
		diff[7] = (red-255)*(red-255) + (green-255)*(green-255) +(blue-255)*(blue-255); //white

		min = 2147483647;

		for(int i=7; i >= 0; i--){
			if(diff[i] <= min){
				min = diff[i];
				min_index = i;
			}
		}

		switch(min_index){
		case 0:printf("black\n");
				break;
		case 1:printf("blue\n");
				break;
		case 2:printf("lime\n");
				break;
		case 3:printf("aqua\n");
				break;
		case 4:printf("red\n");
				break;
		case 5:printf("fuchsia\n");
				break;
		case 6:printf("yellow\n");
				break;
		case 7:printf("white\n");
				break;
		}

	}
    return 0;
}