const k:array[1..15]of integer=(4,7,10,13,16,19,22,25,28,31,34,37,40,43,46);
Var m:Array[1..1000]Of LoNgInt;
    a,b,n,i,j:LoNgInT;
BeGiN
  ReAdLn(a,b);
  m[1]:=1;
  m[b]:=a;
 If a=b then
  For i:=1 to b do m[i]:=i
        else
  BEGIN
  For i:=1 to b-1 do m[i+1]:=k[i];
  END;
  For i:=1 to b do write(m[i],' ');
EnD.