#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a ch; ch["digi"]="nyo"; ch["petit"]="nyu"; ch["rabi"]="a"; ch["gema"]="gema"; ch["piyo"]="pyo"; auto YES=[](){cout<<"CORRECT (maybe)\n";}; auto NO=[](){cout<<"WRONG!\n";}; auto is_symbol= [](char c){ if(isalpha(c)) return false; if(isdigit(c)) return false; return true; }; while(getline(cin,str)){ assert(str.back()!=' '); //assert(str.front()!=' '); if(str.front()==' '){ NO(); continue; } if(count(str.begin(),str.end(),' ')==0){ NO(); continue; } stringstream ss(str); string name; ss>>name; if(!ch.count(name)){ NO(); continue; } string tmp=str.substr(name.size()); string s; for(char c:tmp) s+=tolower(c); int cnt=0; for(char c:s) cnt+=!is_symbol(c); if(cnt<(int)ch[name].size()){ NO(); continue; } if(name=="rabi"){ YES(); continue; } int num=0; while(is_symbol(s.back())){ num++; s.pop_back(); } if(num>3){ NO(); continue; } assert(s.size()>=ch[name].size()); string t=s.substr(s.size()-ch[name].size()); if(t==ch[name]) YES(); else NO(); } cout<