#include "testlib.h"

int main(int argc, char** argv) {
  registerTestlibCmd(argc, argv);
  inf.readInt();
  inf.readInt();
  int T = inf.readInt();
  int ia = inf.readInt();
  ouf.readToken("8a87120bd5122e261c90");
  ans.readToken("8a87120bd5122e261c90");

  int ja = ans.readInt();
  if (ja == -2) {
    quitf(_fail, "jury is wrong: invalid compare call");
  }
  if (ja != ia && ja != -1) {
    quitf(_fail, "jury is wrong: expected %d, found %d", ia, ja);
  }
  int pa = ouf.readInt();
  if (pa == -2) {
    quitf(_wa, "invalid compare call");
  }
  if (pa != ja) {
    quitf(_wa, "expected %d, found %d", ja, pa);
  }

  int jc = ans.readInt();
  if (jc > T) {
    quitf(_fail, "jury is wrong: too many compare calls");
  }
  int pc = ouf.readInt();
  if (pc > T) {
    quitf(_wa, "too many compare calls");
  }

  quitf(_ok, "answer is %d", ja);
}

