import re nyrn = {a:re.compile(".*"+b+"[!-/:-@[-`{-~ ]{0,3}\Z",re.IGNORECASE) for a,b in [("digi","nyo"),("petit","nyu"),("gema","gema"),("piyo","pyo")]} while 1: try: a = raw_input().split(" ") flag = True if (len(a)) < 2: flag = False elif not(a[0] in ["digi","petit","gema","piyo","tabi"]): flag = False else: x = a[0] y = a[1:] s = "".join(y) if x == "rabi": if not (re.match("[!-/:-@[-`{-~]",s)): flag = False else: rm = re.match(nyrn[x],s) if not(rm and rm.group() == s): flag = False print "CORRECT (maybe)" if flag else "WRONG!" except: break