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