import sys def check(T): for t in T: if t.isalnum(): return True else: return False ansstr = ["WRONG!","CORRECT (maybe)"] dic = {"digi":"nyo","petit":"nyu","rabi":"","gema":"gema","piyo":"pyo"} lines = sys.stdin.readlines() for S in lines: ss = S.split() if len(ss) == 1: ans = 0 elif ss[0] not in dic: ans = 0 elif ss[0] == "rabi": if check(S[4:]): ans = 1 else: ans = 0 else: S = S.rstrip() n = len(S) a = (S.lower()).rfind(dic[ss[0]]) if a == -1: ans = 0 else: b = n-a-len(dic[ss[0]]) if b == 0: ans = 1 elif b <= 3: if check(S[-b:].rstrip()): ans = 0 else: ans = 1 else: ans = 0 print(ansstr[ans])