#include <stdio.h>
#include <vector>
#define MOD 1000000007

long long int power(long long int a, long long int b)
{
	long long int ans = 1;
	long long int k = a;
	while(b)
	{
		if(b%2==1) ans*=k, ans%=MOD;
		k*=k, k%=MOD;
		b/=2;
	}
	return ans;
}
long long int inv(long long int k)
{
	return power(k,MOD-2);
}

std::pair<long long int, long long int> func(long long int a, long long int b, long long int m)
{
	if(b==0) return std::make_pair(0,1);
	else
	{
		if(b%2==0)
		{
			std::pair<long long int, long long int> P1 = func(a,b/2,m);
			std::pair<long long int, long long int> P2;
			P2.first = (P1.first * P1.second + P1.first * P1.second + (P1.second*P1.second)/m) % MOD;
			P2.first += (((P1.first*P1.first)%MOD)*m) % MOD, P2.first %= MOD;
			P2.second = (P1.second*P1.second)%m;
			return P2;
		}
		else
		{
			std::pair<long long int, long long int> P1 = func(a,(b-1)/2,m);
			std::pair<long long int, long long int> P2;
			P2.first = (P1.first * P1.second + P1.first * P1.second + (P1.second*P1.second)/m) % MOD;
			P2.first += (((P1.first*P1.first)%MOD)*m) % MOD, P2.first %= MOD;
			P2.second = (P1.second*P1.second)%m;
			
			P2.first *= a, P2.first %= MOD;
			P2.second *= a, P2.first += (P2.second/m), P2.first %= MOD, P2.second%= m;
			return P2;
		}
	}
}

long long int ans[100010];
int main()
{
	long long int a,b;
	scanf("%lld%lld",&a,&b);
	
	std::pair<long long int,long long int> C = func(2,b,a);
	
	C.second--;
	if(C.second<0) C.first--, C.second+=a;
	if(C.first<0) C.first += MOD;
	
	
	long long int A = C.first, B = C.second;
	if(a%2==0)
	{
		for(int i=0;i<a;i++)
		{
			if((i+B)%2==1) ans[i] = 0;
			else
			{
				long long int t = (i+B)/2;
				t %= (a/2);
				
				if(B>=t+(a/2)) ans[i] = 2*A+2;
				else if(B>=t) ans[i] = 2*A+1;
				else ans[i] = 2*A;
			}
		}
	}
	else
	{
		long long int inv;
		for(int i=1;i<a;i++)
		{
			if((2*i)%a==1)
			{
				inv = i;
				break;
			}
		}
		for(int i=0;i<a;i++)
		{
			long long int t = ((long long int)(i+B)*inv) % a;
			if(B>=t) ans[i] = A+1;
			else ans[i] = A;
		}
	}
	
	for(int i=0;i<a;i++) printf("%lld\n",(ans[i]*inv(power(2,b)))%MOD);
}