import string import sys L = sys.stdin.readlines() phrase = {'digi': 'nyo', 'petit': 'nyu', 'gema': 'gema', 'piyo': 'pyo'} for l in L: flag = False name, serif = l.split(' ')[0], ' '.join(l.split(' ')[1:]).lower() for n, f in phrase.items(): if name == n and f in serif: t = list(filter(lambda c: c in string.ascii_letters, f)) if t[-3:] == list(f): flag = True else: continue if name == 'rabi' and len(list(filter(lambda c: c in string.ascii_letters, serif))) != 0: flag = True if flag: print('CORRECT (maybe)') else: print('WRONG!')