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(): length = len(f) if name == n and f in serif[-length-4:]: t = ''.join(list(filter(lambda c: c in string.ascii_letters, serif[-length-4:]))) if t[-length:] == 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!')