#include<cmath>
#include<cstdio>
#include<fstream>
#include<iostream>
using namespace std;
ifstream fi("tinkle.in");
ofstream fo("tinkle.out");
long long su[200001],i,s,n,m,k,nbak;bool bl;
int main()
{
fi>>nbak>>m;n=nbak+m;
s=3;su[1]=2;su[2]=3;su[3]=5;k=7;
while (n>s)
{
i=1;bl=true;
while (bl&&su[i]<=sqrt(double(k)))
{
if (k%su[i]==0) bl=false;
i++;
}
if (bl) su[++s]=k;
k+=2;
}
for (i=nbak-m;i<nbak;i++)
fo<<su[i]<<' ';
for (i=nbak+1;i<n;i++)
fo<<su[i]<<' ';
fo<<su[n]<<endl;
return 0;
}