#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5;
int N, M, A, B[maxn];
const long long mod = 998244353;
const long long inv2 = (mod + 1) / 2;
long long powmod(long long b, long long e) {
  long long r = 1;
  while (e) {
    if (e & 1) r = (r * b) % mod;
    e >>= 1;
    b = (b * b) % mod;
  }
  return r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> N >> M >> A;
  for (auto i = (0); i != (M); ++i) cin >> B[i];
  long long slack = N - 2 * B[M - 1];
  long long MUL = powmod(A, slack);
  for (int i = 0; i < M; i++) {
    long long width = B[i] - (i == 0 ? 0 : B[i - 1]);
    long long Apw = powmod(A, width);
    Apw = (Apw * (Apw + 1)) % mod;
    Apw = (Apw * inv2) % mod;
    MUL = (MUL * Apw) % mod;
  }
  cout << MUL << endl;
  return 0;
}
