#include using namespace std; struct uns_t {} uns; template auto vec(Element init, Head arg, Args ...args) { if constexpr (sizeof...(Args) == 0) return std::vector(arg, init); else return std::vector(arg, vec(init, args...)); } template auto vec(uns_t, Head arg, Args ...args) { return vec(Element(), arg, args...); } int main() { constexpr int64_t mod = 1e9 + 7; auto mpow = [mod](int64_t a, int64_t b) { int64_t ans = 1; while (b) { if (b & 1) { ans = (ans * a) % mod; } a = (a * a) % mod; b >>= 1; } return ans; }; int n, m; cin >> n >> m; cout << n << endl; for (int i = 2; i <= m; ++i) { if (n % i == 0) { cout << (mpow(n / i, i - 2) * (n / i - 1) * (n / i + 1) % mod) << endl; continue; } cout << (mpow((n + i - 1) / i, n % i) * mpow(n / i, i - n % i) % mod) << endl; } }