import sys import re script = sys.stdin.readlines() rule = { "digi": "nyo", "petit": "nyu", "rabi": "", "gema": "gema", "piyo": "pyo" } rabi_re = re.compile("[0-9a-zA-Z]") wrong = "WRONG!" correct = "CORRECT (maybe)" for line in script : line = line.rstrip("\n") flg = False for chara in rule : gobi = rule[chara] if(line.startswith(chara)) : #print "chara:",chara,"gobi:",gobi #print "line:" ,line #print "usiro:" ,line[:3+len(gobi)] if(chara == "rabi") : flg = True if(rabi_re.search(line[4:]) == None): print wrong else: print correct else : flg = True if(gobi in line[(3+len(gobi))*-1:].lower()): print correct else : print wrong if(not flg): print wrong