#include<bits/stdc++.h> using namespace std; int main(){ int m,a; cin>>a>>m; for(int n=1;n<=a;n++){ if(n%m==0){ cout<<n<<" "; } } return 0; }