var
  outfile, ansfile: text;
  a, b, n: integer;
  ok: boolean;
  s, t:string;
begin
  assign(outfile, paramStr(2));
  assign(ansfile, paramStr(3));
  reset(outfile);
  reset(ansfile);
  ok:=true
  while ok and not eof(ansfile) do
    begin
      read(outfile, s);
      read(ansfile, t);
      ok:=(s=t)
    end;
  if ok then
    writeln(10)
  else
    writeln(0);
  close(outfile);
  close(ansfile);
end.

