#include <fstream>
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
int n,m;
int pr[5000001]={0};
bool bo[15500001];
int main()
{
ifstream in("tinkle.in");
ofstream out("tinkle.out");
in>>n>>m;
int k=0;
for (int i=2;i<=15500000;i++)
if (!bo[i])
{
for (int j=2*i;j<=15500000;j+=i)
bo[j]=true;
pr[k]=i;
k++;
}
for (int i=n-m;i<=n+m;i++)
if (i!=n) out<<pr[i-1]<<" ";
return 0;
}