P=10**9+7 n,m=map(int,input().split()) for i in range(1,m+1):q,r=divmod(n+1,i);print(pow(q+1,r,P)*pow(q,i-r-1,P)*(q-1)%P)