import sys def delEnd(sentence): i = len(sentence) - 1 cnt = 0 while cnt < 3 and i >= 0: if sentence[i].isalnum(): break i-=1 cnt+=1 return sentence[0:i + 1] def isdigi(s): return s[-3:] == 'nyo' def ispetit(s): return s[-3:] == 'nyu' def isgema(s): return s[-4:] == 'gema' def ispiyo(s): return s[-3:] == 'pyo' def israbi(s): for i in s: if i.isalnum(): return True return False S = sys.stdin.readlines() for ss in S: s = ss[:-1] if len(s.split()) <= 1: print('WRONG!') continue s1 = s[:s.index(' ')] s2 = delEnd(s[s.index(' ') + 1:].lower()) if s1 == 'digi': print('CORRECT (maybe)' if isdigi(s2) else 'WRONG!') elif s1 == 'petit': print('CORRECT (maybe)' if ispetit(s2) else 'WRONG!') elif s1 == 'rabi': print('CORRECT (maybe)' if israbi(s2) else 'WRONG!') elif s1 == 'gema': print('CORRECT (maybe)' if isgema(s2) else 'WRONG!') elif s1 == 'piyo': print('CORRECT (maybe)' if ispiyo(s2) else 'WRONG!') else: print('WRONG!')