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