object Main {

  import scala.collection.mutable.ArrayBuffer

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val N, K = sc.nextInt
    val mod = 1000000007L

    val res = new ArrayBuffer[Long]()

    val max = 1000000
    var fac = new Array[Long](max)
    var inv = new Array[Long](max)
    var finv = new Array[Long](max)

    comInit()

    def comInit() = {
      fac(0) = 1
      fac(1) = 1
      finv(0) = 1
      finv(1) = 1
      inv(1) = 1
      for (i <- 2 until max) {
        fac(i) = fac(i - 1) * i % mod
        inv(i) = mod - inv((mod % i).toInt) * (mod / i) % mod
        finv(i) = finv(i - 1) * inv(i) % mod
      }
    }

    def comb(n: Int, k: Int): Long = {
      if (n < k) return 0
      if (n < 0 || k < 0) return 0
      fac(n) * (finv(k) * finv(n - k) % mod) % mod
    }

    def hcomb(n: Int, r: Int): Long = {
      comb(n + r - 1, r)
    }

    for (i <- 0 until K) {
      if (i == 0) {
        res += N - K + 1
      } else {
        val insert = comb(K - 1, i) % mod
        res += insert * hcomb(i + 2, N - K - i) % mod
      }
    }

    res.foreach(println)
  }
}