N,K = map(int,input().split()) a = (N+K)%(K+1) cnt = 0 while True: print(a+cnt*(K+1)) cnt += 1 b = int(input()) if b>=N:break