#yuki_257 n,k=map(int,raw_input().split()) res=(n-1)%(k+1) print res sys.stdout.flush() i=1 while True: temp=int(raw_input()) if temp>=n: sys,exit() print res+(k+1)*i sys,stout.flush() i+=1