package q3xx; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.StringReader; import java.util.Arrays; public class Q380LL { static BufferedReader br; static PrintWriter out; static String INPUT = ""; static void solve() throws Exception { String C = "CORRECT (maybe)"; String W = "WRONG!"; while(true){ String line = br.readLine(); if(line == null)break; 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 { long S = System.currentTimeMillis(); br = new BufferedReader(INPUT.isEmpty() ? new InputStreamReader(System.in) : new StringReader(INPUT)); out = new PrintWriter(System.out); solve(); out.flush(); long G = System.currentTimeMillis(); tr(G-S+"ms"); } static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); } }