MOD = 10 ** 9 + 7 n, k = map(int, input().split()) s = (-(pow(2, k, n) - 1)) % n # < 2^(k+1) #(2^k-1)//n, (2^k-1)%n x = pow(2, k, MOD * n) % (MOD * n) q = x // n r = x % n d = [q] * n for i in range(r): d[i] += 1 d2 = [0] * n for i in range(n): d2[2 * i % n] += d[i] ans = [0] * n t = pow(pow(2, k, MOD), MOD - 2, MOD) for i in range(n): ans[(s + i) % n] += d2[i] * t ans[(s + i) % n] %= MOD print(*ans, sep='\n')