#include using namespace std; typedef long long ll; int main(){ ll N, K; cin >> N >> K; ll curr = (N - 1) % (K + 1); for(;;){ cout << curr << endl; curr += K + 1; ll res; cin >> res; if(res >= N){ break; } } return 0; }