uses sysutils;

var
  s: string;
  s1,s2: string;
  k: integer;

begin
  readln(s);
  k := StrToInt(paramstr(1));
  s1 := copy(s,1,k);
  s2 := copy(s,k+1,1000000);
  if Pos(s2,s1)=1 then writeln('ok') else writeln('bad');
end.
