intmain() { init(); int n, m, x; std::cin >> n >> m >> x; std::vector<int> f(m + 1), g(m + 1); for (int i = 0; i <= m; ++ i) scanf("%d", &f[i]), f[i] = (LL) f[i] * infact[i] % Mod; for (int i = 0, op = 1; i <= m; ++ i, op = Mod - op) g[i] = (LL) op * infact[i] % Mod; f = f * g, f.resize(m + 1); int mul = 1, res = 0; for (int i = 0; i <= m; ++ i) { res = (res + (LL) f[i] * mul) % Mod; mul = (LL) mul * x % Mod * (n - i) % Mod; } std::cout << res << std::endl; return0; }