#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T gcd(T a, T b) {
  return a ? gcd(b % a, a) : b;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T sgn(T a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
const double pi = acos(-1.0);
int n;
int m;
const int mod = 998244353;
int power(int x, int m) {
  int res = 1;
  for (; m > 0; m >>= 1) {
    if (m & 1) res = ((long long)res * x) % mod;
    x = ((long long)x * x) % mod;
  }
  return res;
}
int main() {
  int A;
  cin >> n >> m >> A;
  vector<int> b(m + 1);
  for (int i = 0; i < m; i++) {
    cin >> b[i + 1];
  }
  long long ans = 1;
  for (int i = 0; i < m; i++) {
    int cur = b[i + 1] - b[i];
    long long c = power(A, cur);
    ans = c * (c + 1) / 2 % mod * ans % mod;
  }
  int cur = n - 2 * b.back();
  long long c = power(A, cur);
  ans = (ans * c) % mod;
  cout << ans << endl;
  return 0;
}
