#include <iostream>
#include <string>
using namespace std;
int henkan(int i){
	if('0'<=i && i<='9') return i-'0';
	else return i-'a'+10;
}
int main(){
	while(true){
		string s;
		cin >> s;
		if(s=="0") break;
		int r,g,b;
		r=henkan(s[1])*16+henkan(s[2]);
		g=henkan(s[3])*16+henkan(s[4]);
		b=henkan(s[5])*16+henkan(s[6]);
		bool rr=true,gg=true,bb=true;
		if(r<128) rr=false;
		if(g<128) gg=false;
		if(b<128) bb=false;
		if(rr && gg && bb) cout << "white";
		if(rr && gg && !bb) cout << "yellow";
		if(rr && !gg && bb) cout << "fuchsia";
		if(rr && !gg && !bb) cout << "red";
		if(!rr && gg && bb) cout << "aqua";
		if(!rr && gg && !bb) cout << "lime";
		if(!rr && !gg && bb) cout << "blue";
		if(!rr && !gg && !bb) cout << "black";
		cout << endl;
	}
	return 0;
}