import sys def iskigo(c): if c.isdigit(): return 0 if c.isalpha(): return 0 return 1 def hoge(tail,S): id = S.rfind(tail) if id < 0: return 0 id += len(tail) if len(S) - id > 4: return 0 for i in range(id,len(S)): if iskigo(S[i])==0: return 0 return 1 while 1: try: S=raw_input().lower() except: break yes = 0 if S.startswith("digi "): yes = hoge("nyo",S[5:]) elif S.startswith("petit "): yes = hoge("nyu",S[6:]) elif S.startswith("rabi "): S=S[5:] for i in range(len(S)): if iskigo(S[i])==0: yes=1 elif S.startswith("gema "): yes = hoge("gema",S[5:]) elif S.startswith("piyo "): yes = hoge("pyo",S[5:]) if yes == 1: print "CORRECT (maybe)" else: print "WRONG!"