from itertools import * from bisect import * from math import * from collections import * from heapq import * from random import * import numpy as np 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): if line[0]=="digi": e=line[-1] if len(e)<3:return False if e[0] not in ["N","n"]:return False if e[1] not in ["Y","y"]:return False if e[2] not in ["O","o"]:return False for c in e[3:]: if c.isalnum():return False elif line[0] == "petit": e=line[-1] if len(e)<3:return False if e[0] not in ["N","n"]:return False if e[1] not in ["Y","y"]:return False if e[2] not in ["U","u"]:return False for c in e[3:]: if c.isalnum():return False elif line[0]=="rabi": for word in line[1:]: for c in word: if c.isalnum():return True return False elif line[0]=="gema": e=line[-1] if len(e)<4:return False if e[0] not in ["G","g"]:return False if e[1] not in ["E","e"]:return False if e[2] not in ["M","m"]:return False if e[3] not in ["A","a"]:return False for c in e[4:]: if c.isalnum():return False elif line[0]=="piyo": e=line[-1] if len(e)<3:return False if e[0] not in ["P","p"]:return False if e[1] not in ["Y","y"]:return False if e[2] not in ["O","o"]:return False for c in e[3:]: if c.isalnum():return False else:return False s=sys.stdin.read() s=s.split("\n") s=[line.split() for line in s] for line in s: if line==['']:break if ok(line):print("CORRECT (maybe)") else:print("WRONG!") main()