import sys input=lambda: sys.stdin.readline().rstrip() n,k=map(int,input().split()) r=n%(k+1)-1 print(r,flush=True) ct=1 while True: if int(input())>=n: sys.exit else: print(ct*(k+1)+r,flush=True) ct+=1