program fjf318b;

uses gpc;

procedure check (const a : string);
var
  s : tstring;
  i : static integer = 0;
begin
  inc (i);
  readln (s);
  if s <> a then
    begin
      writeln ('failed ', i);
      halt
    end
end;

begin
  check ('foo'#0'foo');
  check ('bar');
  check (stringofchar ('a', 4000));
  check ('kukkuu'#0);
  writeln ('OK')
end.
