#include <bits/stdc++.h>
using namespace std;
long long n, m, lenA;
long long b[201010];
long long mpow(long long base, long long d) {
  long long ans = 1;
  for (; d > 0; d >>= 1) {
    if (d & 1) (ans *= base) %= ((long long)998244353);
    (base *= base) %= ((long long)998244353);
  }
  return ans;
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> lenA;
  b[0] = 0;
  for (int i = 0; i++ < m;) cin >> b[i];
  ++m;
  long long r2 = mpow(2, ((long long)998244353) - 2);
  long long prev = 1;
  for (int i = 0; i++ < m - 1;) {
    long long cur = mpow(lenA, b[i] - b[i - 1]);
    (cur = cur * (cur + 1) % ((long long)998244353) * r2) %=
        ((long long)998244353);
    (cur *= prev) %= ((long long)998244353);
    prev = cur;
  }
  long long ans =
      (prev * mpow(lenA, n - 2 * b[m - 1])) % ((long long)998244353);
  cout << ans;
  return 0;
}
