uses
  testlib, sysutils;

var
  ja, pa: string;
  i: longint;

begin 
  pa := ouf.readstring;
  ja := ans.readstring;
  i := length(pa);
  while (i > 0) and (pa[i] = ' ') do dec(i);
  delete(pa, i + 1, length(pa) - i);
  i := length(ja);
  while (i > 0) and (ja[i] = ' ') do dec(i);
  delete(ja, i + 1, length(ja) - i);
  if pa <> ja then begin
    quit(_wa, 'Expected: "' + ja + '", found: "' + pa + '"');
  end;
  if ouf.seekEof and not ans.seekEof then begin
    QUIT (_PE, 'Not enough lines! "' + ans.readString + '" expected' );
  end;
  if ans.seekEof and not ouf.seekEof then begin
    QUIT (_PE, 'Extra lines! "' + ouf.readString + '" encountered' );
  end;
  QUIT ( _OK, ja );
end.