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 if len(S) - (id + len(tail)) > 4: return 0 for i in range(id+len(tail),len(S)): if iskigo(S[i])==0: return 0 return 1 while 1: try: S=raw_input().strip("\n") except: break if S=="": print "WRONG!" continue A=S.split(" ",1) if A[0]=="" or len(A)==1: print "WRONG!" continue C=A[0] S=A[1].lower() yes = 0 if C=="digi": yes = hoge("nyo",S) elif C=="petit": yes = hoge("nyu",S) elif C=="rabi": for i in range(len(S)): if iskigo(S[i])==0: yes=1 elif C=="gema": yes = hoge("gema",S) elif C=="piyo": yes = hoge("pyo",S) if yes == 1: print "CORRECT (maybe)" else: print "WRONG!"