#include<iostream>
#include<string>
using namespace std;
int main(){
long i,j,k;
string s,c[8]={"black","blue","lime","aqua","red","fuchsia","yellow","white"};
while(cin>>s){
if(s=="0")break;
k=0;
i=s[1]-48;if(s[1]>64)i-=7;
j=s[2]-48;if(s[2]>64)j-=7;
if(i*16+j>=128)k+=4;
i=s[3]-48;if(s[3]>64)i-=7;
j=s[4]-48;if(s[4]>64)j-=7;
if(i*16+j>=128)k+=2;
i=s[5]-48;if(s[5]>64)i-=7;
j=s[6]-48;if(s[6]>64)j-=7;
if(i*16+j>=128)k++;
cout<<c[k]<<endl;
}
return 0;
}