n,k = map(int,input().split()) mod = 10**9+7 x = pow(2,k,n*mod) d,m = divmod(x,n) count = [d]*n for i in range(m): count[i] += 1 ans = [0]*n p = pow(2,k,n)-1 for i in range(n): ans[(2*i-p)%n] += count[i] inv = pow(2,mod-1-k,mod) for i in ans: print(i*inv%mod)