import ru.ifmo.testlib.Checker;
import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;

public class Check implements Checker {
	public Outcome test(InStream inf, InStream ouf, InStream ans) {
		while (true) {
			String verdict = ouf.nextLine().toLowerCase();
            ouf.seekEoLn();
            ouf.skipLine();
            String comment = ouf.nextLine();
            System.err.println("verdict = " + verdict);
            System.err.println("comment = " + comment);
            if (verdict.equals("ok")) {
                throw new Outcome(Outcome.Type.OK, comment);
            } else if (verdict.equals("wa")) {
                throw new Outcome(Outcome.Type.WA, comment);
            } else {
                throw new Outcome(Outcome.Type.PE, verdict + ", " + comment);
            }
		}
	}
}
