/******************************************************************/
/* ACM ICPC 2012-2013                                             */
/* Northeastern European Regional Contest                         */
/* St Petersburg - Barnaul - Tashkent - Tbilisi, December 2, 2012 */
/******************************************************************/
/* Problem B. Blind Problem Solving                               */
/*                                                                */
/* Original idea         Maxim Buzdalov                           */
/* Problem statement     Maxim Buzdalov                           */
/* Test set              Maxim Buzdalov                           */
/******************************************************************/
/* Checker                                                        */
/*                                                                */
/* Author                Maxim Buzdalov                           */
/******************************************************************/

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 (!ouf.seekEoF()) {
			String verdict = ouf.nextLine();
			String[] s = verdict.split(" ", 2);
			if (s[0].equals("<") || s[0].equals(">") || s[0].equals("%"))
				continue; // skip log lines
			Outcome.Type type = Outcome.Type.valueOf(s[0]);
			return new Outcome(type, s[1]);
		}
        return new Outcome(Outcome.Type.WA, "User program terminated too early");
    }
}

