#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
long long int fastPow(long long int x, long long int y) {
  long long int p = mod;
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int arr[200005];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cin.tie(0), cout.tie(0),
      cout.precision(15);
  long long int n, m, A, res = 1;
  cin >> n >> m >> A;
  for (long long int i = 1; i <= m; i++) {
    cin >> arr[i];
  }
  res = fastPow(A, n - 2 * arr[m]);
  for (long long int i = m - 1; i >= 0; i--) {
    long long int tmp = fastPow(A, arr[i + 1] - arr[i]) % mod;
    long long int tmp2 = (tmp * ((tmp - 1 + mod) % mod) / 2) % mod;
    long long int tmp3 = (tmp + tmp2) % mod;
    res = (res * tmp3) % mod;
  }
  cout << res;
  return 0;
}
