#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
long long POW(long long a, long long b, long long MMM = MOD) {
  long long ret = 1;
  for (; b; b >>= 1, a = (a * a) % MMM)
    if (b & 1) ret = (ret * a) % MMM;
  return ret;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) {
  if (a == 0 || b == 0) return a + b;
  return a * (b / gcd(a, b));
}
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
int ddx[] = {0, 0, 1, 1, 1, -1, -1, -1}, ddy[] = {1, -1, 1, 0, -1, 1, 0, -1};
int b[200001];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int(i) = (1); (i) <= (m); (i) += (1)) scanf("%d", b + i);
  long long ans = POW(k, n - 2 * b[m]);
  for (int(i) = (1); (i) <= (m); (i) += (1)) {
    int c = b[i] - b[i - 1];
    long long t = (POW(k, 2 * c) + POW(k, c)) % MOD;
    t = (t * ((MOD + 1) / 2)) % MOD;
    ans = (ans * t) % MOD;
  }
  printf("%lld", ans);
}
