#include<bits/stdc++.h> usingnamespacestd; typedeflonglong ll; #define pii pair<int, int> #define mk make_pair constint N = 1e6 + 10; constint mod = 1e9 + 7; ll qpow(ll a, ll x, ll mo) { ll res = 1; while (x) { if (x & 1) res = 1ll * res * a % mod; a = 1ll * a * a % mod; x >>= 1; } return res; } int fac[N], facinv[N]; voidprepare() { fac[0] = 1; facinv[0] = 1; for (int i = 1; i < N; i++) fac[i] = 1ll * fac[i - 1] * i % mod; facinv[N - 1] = qpow(fac[N - 1], mod - 2, mod); for (int i = N - 2; i >= 1; i--) facinv[i] = 1ll * facinv[i + 1] * (i + 1) % mod; } ll C(ll i, ll n) { if (n <= 0) return0; if (i > n) return0; if (i == 0) return1; return1ll * fac[n] * facinv[i] % mod * facinv[n - i] % mod; } int v[N], a[N]; ll f[N]; int n, m, k; intmain() { prepare(); scanf("%d%d%d", &n, &m, &k); for (int i = 1; i <= n; i++) scanf("%d", &a[i]), v[a[i]]++; for (int i = m; i >= 1; i--) { int num = 0; for (int j = i; j <= m; j += i) num += v[j];
int p = 0; for (int j = i; j <= m; j += i) p = (p + f[j]) % mod; f[i] = (0ll + C(k, num) - p + mod + mod) % mod; } for (int i = 1; i <= m; i++) printf("%lld ", f[i]); }