(*--------------------------------------------------------------*)
(* ACM ICPC 2009-2010, NEERC                                    *)
(* Northern Subregional Contest                                 *)
(* St Petersburg, October 17, 2009                              *)
(*--------------------------------------------------------------*)
(* Problem C. Circles on a Screen                               *)
(*                                                              *)
(* Original idea         Georgiy Korneev                        *)
(* Problem statement     Oleg Davydov                           *)
(* Testset               Oleg Davydov                           *)
(*--------------------------------------------------------------*)
(* Checker                                                      *)
(*                                                              *)
(* Author                od                                     *)
(*--------------------------------------------------------------*)
 
uses
    testlib, sysutils;
var
    ja, pa: string;
    i: longint;

function compress(s: string): string;
begin
    if length(s) < 100 then
        compress := s
    else
        compress := copy(s, 1, 50) + '..' + copy(s, length(s) - 24, 50);
end;

begin
    ja := ans.readword(blanks, blanks);
    pa := ouf.readword(blanks, blanks);

    if not (pa[1] in ['-', '0'..'9']) then
        quit(_pe, 'invalid character in answer');
    for i := 2 to length(pa) do
        if not (pa[i] in ['0'..'9']) then
            quit(_pe, 'invalid character in answer');

    if ja <> pa then
        quit(_wa, 'expected: "' + compress(ja) + '", found: "' + compress(pa) + '"');

    quit(_ok, pa);
end.