import sys import re for line in sys.stdin: words = [s.lower() for s in line.rstrip().split(' ')] flg = False if words[0] == 'digi': flg |= all([w == 'nyo' for w in words[1:]]) flg |= re.match('.*nyo([^a-z]?)([^a-z]?)([^a-z]?)', words[-1]) != None elif words[0] == 'petit': flg |= all([w == 'nyu' for w in words[1:]]) flg |= re.match('.*nyu([^a-z]?)([^a-z]?)([^a-z]?)', words[-1]) != None elif words[0] == 'rabi': flg |= all([re.match('.*[a-z].*', w) for w in words[1:]]) elif words[0] == 'gema': flg |= all([w == 'gema' for w in words[1:]]) flg |= re.match('.*gema([^a-z]?)([^a-z]?)([^a-z]?)', words[-1]) != None elif words[0] == 'piyo': flg |= all([w == 'pyo' for w in words[1:]]) flg |= re.match('.*pyo([^a-z]?)([^a-z]?)([^a-z]?)', words[-1]) != None if flg: print('CORRECT (maybe)') else: print('WRONG!')