n, k = gets.chomp.split.map(&:to_i)

num = 1000000007

k_1 = k - 1
n_k_1 = n - k + 1

answer = n - k + 1
p answer
(2..k).each do |i|
  if n_k_1 < i
    p 0
  else
    answer = (answer * (k_1 - (i - 2)) / (i - 1) * (n_k_1 - (i - 1)) / i) % num
    p answer
  end
end
