program Check;

{$H+}
{$APPTYPE CONSOLE}
{$MAXSTACKSIZE 10000000}

uses
  TestLib, SysUtils;

var
  out_val, ans_val: string;

procedure trim(var s: string);
begin
	while (Length(s)>0) and (s[1]=' ') do Delete(s,1,1);
	while (Length(s)>0) and (s[Length(s)]=' ') do Delete(s,Length(s),1);
end;

begin
  out_val:= ouf.ReadString;
  ans_val:= ans.ReadString;
  
  trim(out_val);
  trim(ans_val);

  if not ouf.SeekEof then quit(_PE,'Extra characters in output file.');

  if out_val<>ans_val then begin
  	if (Length(ans_val) > 100) then ans_val := Copy(ans_val,1,100) + '...';
  	if (Length(out_val) > 100) then out_val := Copy(out_val,1,100) + '...';
    quit (_WA, Format('%s expected, but %s found',[ans_val,out_val]));
  end;

  quit(_OK,'');
end.
