include
using namespace std;
int ans(int x,int y){
int v;
for(int u=1;u<x;u++){
v=3u+2;
if(v%y!=0){
cout<<v<<endl;
}
}
return 0;
}
int main() {
int n1;
int n2;
cin>>n1;
cout<<endl;
cin>>n2;
ans(n1,n2);
return 0;
}