#include using namespace std; int main() { int n, k; cin >> n >> k; int prev = (n - 1) % (k + 1); cout << prev << endl; for (;;) { int b; cin >> b; if (b >= n) return 0; cout << prev + k + 1 << endl; } }