uses
  testlib, sysutils;

var
  ja, pa: string;
  i: longint;
  
begin 
  pa := ouf.readstring;
  ja := ans.readstring;
  if pa <> ja then begin
    if (length(pa) <> length(ja)) then
      quit(_wa, 'Wrong length of output');
    for i := 1 to length(pa) do
      if (pa[i] <> ja[i]) then
        quit(_wa, 'On position ' + inttostr(i) + ' - expected: "' + ja[i] + '", found: "' + pa[i] + '"');
  end;
  if ans.seekEof and not ouf.seekEof then begin
    QUIT (_WA, 'Extra lines! "' + ouf.readString + '" encountered' );
  end;
  QUIT ( _OK, 'Ok' );
end.