N, M = map(int,input().split()) for i in range(1, M+1): if i == 1: print(N) else: a = int((N+1)/i) if a < 2: print(0) elif N == a*i-1: if a%2 == 0: print(pow(a, i-1)*(a-1)) else: print(a*pow(a-1, i-1)) else: print(pow(a, (1+a)*i-N-2)*pow(a+1, N-a*i+1))