#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
const int N = 3e5 + 5;
int n, m, k, a[N];
long long ans;
long long Ksm(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    b /= 2;
    a = a * a % mod;
  }
  return res;
}
int main() {
  cin >> n >> m >> k;
  for (register int i = 1; i <= m; i++) cin >> a[i];
  ans = 1;
  for (register int i = 1; i <= m; i++) {
    long long tmp = Ksm(k, a[i] - a[i - 1]);
    ans = ans * tmp % mod * (tmp + 1) % mod * Ksm(2, mod - 2) % mod;
  }
  ans = ans * Ksm(k, n - 2 * a[m]) % mod;
  cout << ans << endl;
}
