#include using namespace std; int main(){ int n,k;cin>>n>>k; cout << n%(k+1) << endl; int nw = 1; int rem = n%(k+1); while(true){ int x;cin>>x; if(x >= n){ return 0; } cout << nw*(k+1)+rem << endl; nw++; } }