import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def MI1(): return map(int1, sys.stdin.readline().split()) def MF(): return map(float, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LI1(): return list(map(int1, sys.stdin.readline().split())) def LF(): return list(map(float, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] dij = [(1, 0), (0, 1), (-1, 0), (0, -1)] def main(): def ok(line): n=len(line) if n>=8 and line[:5]=="digi ": for _ in range(3): if line[-1].isalnum():break line=line[:-1] if line[-3:].lower()!="nyo":return False elif n>=9 and line[:6] == "petit ": for _ in range(3): if line[-1].isalnum():break line=line[:-1] if line[-3:].lower()!="nyu":return False elif n>=6 and line[:5]=="rabi ": for c in line[5:]: if c.isalnum():return True return False elif n>=8 and line[:5]=="gema ": for _ in range(3): if line[-1].isalnum():break line=line[:-1] if line[-4:].lower()!="gema":return False elif n>=8 and line[:5]=="piyo ": for _ in range(3): if line[-1].isalnum():break line=line[:-1] if line[-3:].lower()!="pyo":return False else:return False return True s=sys.stdin.read()[:-1] s=s.split("\n") for line in s: if ok(line):print("CORRECT (maybe)") else:print("WRONG!") main()