intmain() { init(); int n, m, S; std::cin >> n >> m >> S; poly w(m + 1), g(infact, infact + m + 1), f(m + 1); for (int i = 0; i <= m; ++ i) if (i & 1) adj(g[i] = -g[i]); for (int &x : f) scanf("%d", &x); for (int i = 0; i <= m; ++ i) if (i * S > n) w[i] = 0; else w[i] = (LL) C(m, i) * fact[n] % Mod * qpow(infact[S], i) % Mod * infact[n - i * S] % Mod * qpow(m - i, n - i * S) % Mod * fact[i] % Mod; std::reverse(g.begin(), g.end()); w = w * g; int res = 0; for (int i = m; i <= 2 * m; ++ i) res = (res + (LL) w[i] * infact[i - m] % Mod * f[i - m]) % Mod; int sum = 0; for (int i = m; i <= 2 * m; ++ i) adj(sum += w[i] * (LL) infact[i - m] % Mod - Mod); std::cout << res << std::endl; return0; }