#include using namespace std; #define int long long bool OK(string s, string word) { reverse(s.begin(), s.end()); reverse(word.begin(), word.end()); for (int i = 0; i < s.size(); i++) { if (isupper(s[i])) s[i] = s[i] - 'A' + 'a'; } for (int i = 0; i <= min(3, (signed)s.size() - 1); i++) { if (s.substr(i, word.size()) == word) return true; if (isalnum(s[i])) return false; } return false; } bool Solve(string name, string s) { if (name == "digi") return OK(s, "nyo"); if (name == "petit") return OK(s, "nyu"); if (name == "gema") return OK(s, "gema"); if (name == "piyo") return OK(s, "pyo"); if (name == "rabi") { for (int i = 0; i < s.size(); i++) { if (isalnum(s[i])) return true; } return false; } return false; } signed main() { string Name, S; while (cin >> Name) { cin.clear(); cin.ignore(); getline(cin, S); if (Solve(Name, S)) puts("CORRECT (maybe)"); else puts("WRONG!"); } return 0; }