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