#yuki1419 MOD=10**9+7 n,k=map(int,input().split()) s=(-(pow(2,k,n)-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] res=[0]*n t=pow(pow(2,k,MOD),MOD-2,MOD) for i in range(n): res[(s+i)%n]+=d2[i]*t res[(s+i)%n]%=MOD print(*res,sep='\n')