#include
#include
using namespace std;
int main() {
char a,b,c;
cin>>a>>b>>c;
if ((a=='black')&&(b=='black')&&(c=='green')) cout<<"black"<<endl<<"black"<<endl<<"GREEN";
if ((a=='black')&&(b=='black')&&(c=='GREEN"')) cout<<"black"<<endl<<"yellow"<<endl<<"black";
if ((a=='black')&&(b=='yellow')&&(c=='black')) cout<<"red"<<endl<<"black"<<endl<<"black";
if ((a=='red')&&(b=='black')&&(c=='black')) cout<<"red"<<endl<<"yellow"<<endl<<"black";
if ((a=='red')&&(b=='YELLOW')&&(c=='black')) cout<<"black"<<endl<<"black"<<endl<<"green";
if ((a=='black')&&(b=='YELLOW')&&(c=='black')) cout<<"black"<<endl<<"YELLLOW"<<endl<<"black";
else cout<<"error";
return 0;
}
#include
using namespace std;
int main() {
char a,b,c;
cin>>a>>b>>c;
if ((a=='black')&&(b=='black')&&(c=='green')) cout<<"black"<<endl<<"black"<<endl<<"GREEN";
if ((a=='black')&&(b=='black')&&(c=='GREEN"')) cout<<"black"<<endl<<"yellow"<<endl<<"black";
if ((a=='black')&&(b=='yellow')&&(c=='black')) cout<<"red"<<endl<<"black"<<endl<<"black";
if ((a=='red')&&(b=='black')&&(c=='black')) cout<<"red"<<endl<<"yellow"<<endl<<"black";
if ((a=='red')&&(b=='YELLOW')&&(c=='black')) cout<<"black"<<endl<<"black"<<endl<<"green";
if ((a=='black')&&(b=='YELLOW')&&(c=='black')) cout<<"black"<<endl<<"YELLLOW"<<endl<<"black";
else cout<<"error";
return 0;
}