MOD = 10 ** 9 + 7

n, k = $stdin.readline.chomp.split.map(&:to_i)
inv = Array.new(n + 1, 0)
inv[0] = 1
fact = Array.new(n + 1, 0)
fact[0] = 1
fact_inv = Array.new(n + 1, 0)
fact_inv[0] = 1

n.times do |i|
  if i == 0
    inv[i + 1] = 1
  else
    inv[i + 1] = (- inv[MOD % (i + 1)] * (MOD / (i + 1))) % MOD
  end
end

1.step(n) do |i|
  fact[i] = (fact[i - 1] * i) % MOD
  fact_inv[i] = (fact_inv[i - 1] * inv[i]) % MOD
end

1.step(k) do |i|
  if n - k + 1 < i
    res = 0
  else
    res = (fact[n - k + 1] * fact_inv[n - k + 1 - i] * fact_inv[i]) % MOD
    res = (res * fact[k - 1] * fact_inv[k - i] * fact_inv[i - 1]) % MOD
  end
  puts res
end