#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); string str; while(getline(cin, str)){ stringstream ss(str); vector a; int id = 0; if(str.empty() || !islower(str[0])){ cout << "WRONG!\n"; continue; } while(ss >> str){ if(id++) for(auto &&c : str) if(isupper(c)) c ^= 32; a.emplace_back(str); } if(a.size() <= 1){ cout << "WRONG!\n"; continue; } bool ans = false; if(a[0] == "digi"){ ans |= a.back().substr(max(0, int(a.back().size()) - 3), 3) == "nyo"; for(int i = 0; i < 3; i++){ if(!a.back().empty() && !isalnum(a.back().back())) a.back().pop_back(); if(a.back().empty()){ a.pop_back(); if(a.size() <= 1) break; } ans |= a.back().substr(max(0, int(a.back().size()) - 3), 3) == "nyo"; } }else if(a[0] == "petit"){ ans |= a.back().substr(max(0, int(a.back().size()) - 3), 3) == "nyu"; for(int i = 0; i < 3; i++){ if(!a.back().empty() && !isalnum(a.back().back())) a.back().pop_back(); if(a.back().empty()){ a.pop_back(); if(a.size() <= 1) break; } ans |= a.back().substr(max(0, int(a.back().size()) - 3), 3) == "nyu"; } }else if(a[0] == "rabi"){ for(int i = 1; i < a.size(); i++){ for(auto &&c : a[i]){ if(isalnum(c)) ans |= true; } } }else if(a[0] == "gema"){ ans |= a.back().substr(max(0, int(a.back().size()) - 4), 4) == "gema"; for(int i = 0; i < 3; i++){ if(!a.back().empty() && !isalnum(a.back().back())) a.back().pop_back(); if(a.back().empty()){ a.pop_back(); if(a.size() <= 1) break; } ans |= a.back().substr(max(0, int(a.back().size()) - 4), 4) == "gema"; } }else if(a[0] == "piyo"){ ans |= a.back().substr(max(0, int(a.back().size()) - 3), 3) == "pyo"; for(int i = 0; i < 3; i++){ if(!a.back().empty() && !isalnum(a.back().back())) a.back().pop_back(); if(a.back().empty()){ a.pop_back(); if(a.size() <= 1) break; } ans |= a.back().substr(max(0, int(a.back().size()) - 3), 3) == "pyo"; } } cout << (ans ? "CORRECT (maybe)" : "WRONG!") << '\n'; } }