#include <bits/stdc++.h>
using namespace std;
const int N = 200000 + 13;
const int MOD = 998244353;
int n, m, A;
int b[N];
int add(int a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
int mul(int a, int b) { return (a * 1ll * b) % MOD; }
int binpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}
int cnt(int x) {
  int base = binpow(A, x);
  return mul(add(mul(base, base), base), (MOD + 1) / 2);
}
int main() {
  scanf("%d%d%d", &n, &m, &A);
  for (int i = 0; i < m; i++) cin >> b[i];
  int ans = binpow(A, n - b[m - 1] * 2);
  ans = mul(ans, cnt(b[0]));
  for (int i = 0; i < m - 1; i++) ans = mul(ans, cnt(b[i + 1] - b[i]));
  printf("%d\n", ans);
  return 0;
}
