#include #include #include #include using namespace std; //namaega184 int main(){ int n,k;scanf("%d%d",&n,&k); int now=0,d=n%(k+1); int dis=((n-1)-now-d+k+1)%(k+1); if(dis)now+=k+1-dis; printf("%d\n",now); fflush(stdout); while(1){ scanf("%d",&now); if(now>=n)break; dis=((n-1)-now-d+k+1)%(k+1); now+=k+1-dis; printf("%d\n",now); fflush(stdout); } return 0; }