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[-7:]: t = ''.join(list(filter(lambda c: c in string.ascii_letters, serif[-7:]))) if t[-3:] == 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!')