module DiceMaking def solve(n, k) if n % k == 0 x = n / k ([1] * x + (x + 1 .. n).to_a).join(" ") else "-1" end end module_function :solve end n, k = gets.chomp.split(/\s+/).map(&:to_i) puts DiceMaking.solve(n, k)