Program PP;
Var t:array[1..17000000]of boolean;
su:array[1..1100000]of longint;
i,j,yy,n,m:longint;
begin
assign(input,'tinkle.in'); reset(input);
assign(output,'tinkle.out'); rewrite(output);
readln(n,m);
fillchar(t,sizeof(t),true);
t[1]:=false;
yy:=0;
for i:=2 to 17000000 do
if t[i]=true then begin
inc(yy);
for j:=2 to 17000000 div i do t[i*j]:=false;
su[yy]:=i;
if yy=2*m+n then break;
end;
if n-m<=1 then
for i:=1 to 2*m+1 do begin if i<>n then write(su[i],' '); end
else
for i:=n-m to m+n do begin if i<>n then write(su[i],' '); end;
close(input);
close(output);
end.