#include <bits/stdc++.h>
using namespace std;
int A, N, M, v[200005], Ans;
long long Pow(long long base, int exp) {
  long long act = 1;
  for (int i = 0; i < 31; i++) {
    if (exp & (1 << i)) act = act * base % 998244353;
    base = base * base % 998244353;
  }
  return act;
}
int main() {
  cin >> N >> M >> A;
  for (int i = 1; i <= M; i++) cin >> v[i];
  Ans = Pow(A, N - 2 * v[M]);
  for (int i = 1; i <= M; i++) {
    long long x = 1LL *
                  (Pow(A, 2 * (v[i] - v[i - 1])) + Pow(A, v[i] - v[i - 1])) %
                  998244353;
    x = x * Pow(2, 998244353 - 2) % 998244353;
    Ans = 1LL * Ans * x % 998244353;
  }
  printf("%d", Ans);
  return 0;
}
