package q3xx; import java.io.PrintWriter; import java.util.Arrays; import java.util.Scanner; public class Q380L21 { static Scanner in; static PrintWriter out; static String INPUT = ""; static void solve() { String C = "CORRECT (maybe)"; String W = "WRONG!"; while(in.hasNextLine()){ String line = in.nextLine(); if(line.indexOf(' ') == -1){ out.println(W); continue; } String[] sp = line.split(" ", 2); String se = sp[1].toLowerCase(); if(sp[0].equals("digi")){ out.println(se.matches("^.*nyo([^A-Za-z0-9]{1,3})?$") ? C : W); }else if(sp[0].equals("petit")){ out.println(se.matches("^.*nyu([^A-Za-z0-9]{1,3})?$") ? C : W); }else if(sp[0].equals("rabi")){ out.println(se.matches("^.*[A-Za-z0-9].*$") ? C : W); }else if(sp[0].equals("gema")){ out.println(se.matches("^.*gema([^A-Za-z0-9]{1,3})?$") ? C : W); }else if(sp[0].equals("piyo")){ out.println(se.matches("^.*pyo([^A-Za-z0-9]{1,3})?$") ? C : W); }else{ out.println(W); } } } public static void main(String[] args) throws Exception { in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT); out = new PrintWriter(System.out); solve(); out.flush(); } static int ni() { return Integer.parseInt(in.next()); } static long nl() { return Long.parseLong(in.next()); } static double nd() { return Double.parseDouble(in.next()); } static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); } }