#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ map re; re['g']=regex(R"([Nn][Yy][Oo][^A-Za-z0-9]{0,3}$)"); re['t']=regex(R"([Nn][Yy][Uu][^A-Za-z0-9]{0,3}$)"); re['b']=regex(R"([A-Za-z0-9])"); re['m']=regex(R"([Gg][Ee][Mm][Aa][^A-Za-z0-9]{0,3}$)"); re['y']=regex(R"([Pp][Yy][Oo][^A-Za-z0-9]{0,3}$)"); regex namere(R"(^(digi|petit|rabi|gema|piyo)[ ])"); string s; while(getline(cin,s)){ if(regex_search(s,namere)){ char n=s[2]; s=regex_replace(s,namere,""); //puts(s.c_str()); puts(regex_search(s,re[n])?"CORRECT (maybe)":"WRONG!"); }else{ puts("WRONG!"); } } return 0; }