import sys import re input_line = sys.stdin.readlines() input_line = [s.rstrip('\n') for s in input_line] digi = re.compile(r'([nN][yY][oO])[^a-zA-Z0-9]{0,3}?$') petit = re.compile(r'([nN][yY][uU])[^a-zA-Z0-9]{0,3}?$') gema = re.compile(r'([gG][eE][mM][aA])[^a-zA-Z0-9]{0,3}?$') piyo = re.compile(r'([pP][yY][oO])[^a-zA-Z0-9]{0,3}?$') rabi = re.compile(r'[a-zA-Z0-9]') for serif in input_line: character = serif.split()[0] if character == 'digi': obj = digi.search(serif) if obj: print('CORRECT (maybe)') else: print('WRONG!') elif character == 'petit': obj = petit.search(serif) if obj: print('CORRECT (maybe)') else: print('WRONG!') elif character == 'gema': obj = gema.search(serif) if obj: print('CORRECT (maybe)') else: print('WRONG!') elif character == 'piyo': obj = piyo.search(serif) if obj: print('CORRECT (maybe)') else: print('WRONG!') elif character == 'rabi': obj = rabi.search(serif) if obj: print('CORRECT (maybe)') else: print('WRONG!') else: print('WRONG!')