/******************************************************************/
/* ACM ICPC 2017-2018, NEERC                                      */
/* Northern Subregional Contest                                   */
/* St Petersburg, November 4, 2017                                */
/******************************************************************/
/* Problem J. Joker                                               */
/*                                                                */
/* Original idea         Gennady Korotkevich                      */
/* Problem statement     Borys Minaiev                            */
/* Test set              Borys Minaiev                            */
/******************************************************************/
/* Checker                                                        */
/*                                                                */
/* Author                Borys Minaiev                            */
/******************************************************************/

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

import static ru.ifmo.testlib.Outcome.Type.OK;
import static ru.ifmo.testlib.Outcome.Type.WA;

public class Check implements Checker {
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        inf.nextInt();
        int m = inf.nextInt();
        for (int i = 0; i < m + 1; i++) {
            int user = ouf.nextInt();
            int jury = ans.nextInt();
            if (user != jury) {
                return new Outcome(WA, String.format("After operation %d: expected %d, found %d", i, jury, user));
            }
        }
        return new Outcome(OK, "");
    }
}

