var
i,j,k,num,n,m:longint;
f:array[1..2000] of longint;
a:array[1..1000000] of longint;
p:array[1..10000] of longint;
mark:array[1..10000000] of boolean;
begin
for i:=2 to 90000 div 2 do
for j:=2 to 300 do
if i*j<10000000 then
mark[i*j]:=true;
for i:= 2 to 1000025 do
if not mark[i] then
begin
inc(num);
a[num]:=i;
end;
assign(input,'tinkle.in');
reset(input);
assign(output,'tinkle.out');
rewrite(output);
read(n,m);
if n-m<=0 then
begin
for i:= 1 to n*2-1 do
if i<>n then
begin
if i<>n+m then
write(a[i],' ')
else
writeln(a[i]);
end;
end
else begin
for i:=n-m to n+m do
if i<>n then
begin
if i<>n+m
then write(a[i],' ')
else
writeln(a[i]);
end;
end;
close(input);
close(output);
end.