#yuki_257

n,k=map(int,raw_input().split())
res=(n-1)%(k+1)
print res
i=1
while True:
 temp=int(raw_input())
 if temp>=n:
  break
 print res+(k+1)*i
 i+=1