var a,b,c,d,e,f:integer;
    n:array[1..1000] of integer;

begin
     read(a,b);
     if b>a then exit;
     c:=(a-1) div (b-1);
     d:=(a-1) mod (b-1);
     f:=1;
     for e:=1 to b do begin
                           n[f]:=1;
                           f:=f+c;
                           if d>0 then begin
                                            f:=f+1;
                                            d:=d-1;
                                       end;
                      end;
     for e:=1 to a do if n[e]=1 then write(e,' ');
     writeln;
end.