#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 (t < N) { ll a; cin >> a; if (a >= N) break; cout << t << "\n"; t += K; } return 0; }