integer(16) N,K,aka
integer(16) mo
integer(16) ans
integer(16) i
integer(16),allocatable,dimension(:)::Kaijo

read*,n,k
aka=n-k
mo=10**9+7

allocate(Kaijo(0:N))
Kaijo(0)=1
do i=1,N
  Kaijo(i)=mod(Kaijo(i-1)*i,mo)
end do


do i=1,K
  ans=0
  if(aka>=i-1.and.i-2>=0)then
    ans=mod(ans +mod(combination(K-1,i-1,mo)*combination(aka-1,i-2,mo),mo),mo)
  endif

  if(aka>=i)then
    ans=mod(ans +mod(combination(K-1,i-1,mo)*combination(aka-1,i-1,mo)*2,mo),mo)
  endif

  if(aka>=i+1)then
    ans=mod(ans +mod(combination(K-1,i-1,mo)*combination(aka-1,i,mo),mo),mo)
  endif
  
  print"(i0)",ans
end do


contains

function combination(n,k,l)
integer(16),intent(in)::n,k,l
integer(16) combination,i

combination=mod(Kaijo(N)*inv(Kaijo(K),l)*inv(Kaijo(N-K),l),l)

end function combination

function inv(K,L)
integer(16),intent(in)::k,l
integer(16) l2,y
integer(16) inv
inv=1
l2=l-2
y=k
do
  if(mod(l2,2)==1)inv=mod(inv*y,l)
  y=mod(y*y,l)
  l2=l2/2
  if(l2==0)exit
end do
end function inv

end