#include <bits/stdc++.h>
using namespace std;
const long long maxN = 2e5 + 132;
const long long INF = 1e9 + 12;
const long long mod = 998244353;
long long n, k, m, dp[maxN], b[maxN];
long long pw(long long x, long long y) {
  if (!y) return 1;
  long long u = pw(x, y / 2);
  u = (u * u) % mod;
  if (y % 2) u = (u * x) % mod;
  return u;
}
int32_t main() {
  cin >> n >> m >> k;
  dp[0] = pw(k, n);
  for (long long i = 1; i <= m; i++) cin >> b[i];
  long long y = pw(k, mod - 2);
  for (long long i = 1; i <= m; i++) {
    dp[i] = (dp[i - 1] + dp[i - 1] * pw(y, b[i] - b[i - 1]) % mod) % mod;
  }
  long long ans = (dp[m] * (pw(pw(2, mod - 2), m) % mod)) % mod;
  cout << ans << endl;
}
