#include using namespace std; typedef long long ll; int main() { // cin.tie(0); // ios::sync_with_stdio(false); ll N, K; cin >> N >> K; ll t = (N - 1) % (K + 1); if (t == 0) { cout << "0\n"; } else { cout << t << "\n"; } while (true) { ll a; cin >> a; if (a >= N) break; t += K + 1; cout << t << "\n"; } return 0; }