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