list=[] n,m=map(int,input().split()) for x in range(1,n+1): if x%m==0: list.append(x) for i in list: print(i,end=" ")