N,K=gets.split.map &:to_i
begin
  1.each{|i|p~-N%-~K-~K*i;STDOUT.flush}
rescue
exit 0
end
exit 1