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