#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if(y < x) x = y; } template static void amax(T &x, U y) { if(x < y) x = y; } bool myissymbol(char c) { return !isalnum(c); } int main() { const vector> list = { { "digi", "nyo" }, { "petit", "nyu" }, { "rabi", "" }, { "gema", "gema" }, { "piyo", "pyo" } }; char *buf = new char[100 * 1024 + 3]; while(fgets(buf, 100 * 1024 + 2, stdin) && !feof(stdin)) { string s = buf; if(s.back() == '\n') s.pop_back(); bool wrong = true; for(const auto &p : list) { if(s.size() < p.first.size() + 1 || s.substr(0, p.first.size() + 1) != p.first + ' ') continue; auto t = s.substr(p.first.size() + 1); bool ok = false; if(p.first == "rabi") { for(char c : t) ok |= !myissymbol(c); } else { rer(k, 0, 3) { if(t.size() < p.second.size() + k) continue; bool a = true; rep(i, p.second.size()) a &= tolower(t[t.size() - k - p.second.size() + i]) == p.second[i]; rep(i, k) a &= myissymbol(t[t.size() - 1 - i]); ok |= a; } } wrong &= !ok; } puts(wrong ? "WRONG!" : "CORRECT (maybe)"); } return 0; }