import re di = re.compile(r'^digi ([^ ]+.*)*(n|N)(y|Y)(o|O)[^a-zA-Z0-9]{0,3}$') pe = re.compile(r'^petit ([^ ]+.*)*(n|N)(y|Y)(u|U)[^a-zA-Z0-9]{0,3}$') ra = re.compile(r'^rabi ([^ ]+.*)*[a-zA-Z0-9]+.*$') ge = re.compile(r'^gema ([^ ]+.*)*(g|G)(e|E)(m|M)(a|A)[^a-zA-Z0-9]{0,3}$') pi = re.compile(r'^piyo ([^ ]+.*)*(p|P)(y|Y)(o|O)[^a-zA-Z0-9]{0,3}$') AC='CORRECT (maybe)' WG='WRONG!' def solve(s): if re.search(di,s) or re.search(pe,s) or re.search(ra,s) or re.search(ge,s) or re.search(pi,s): return True return False while 1: s=input() if s=='': break if solve(s): print(AC) else: print(WG)