#include <bits/stdc++.h>
using namespace std;
long long mod = 998244353;
long long p(long long a, long long b) {
  if (b == 0) return 1;
  long long temp = p(a, b / 2);
  temp = (temp * temp) % mod;
  if (b % 2 != 0) temp = (temp * a) % mod;
  return temp;
}
long long fun(long long k, long long i) {
  long long temp = p(k, i);
  long long res = (temp * ((temp - 1 + mod) % mod)) % mod;
  res = (res * p(2, mod - 2)) % mod;
  res = (res + temp) % mod;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> util;
  long long b[m];
  for (long long i = 0; i < m; i++) {
    cin >> b[i];
    if (i == 0)
      util.push_back(b[i]);
    else
      util.push_back(b[i] - b[i - 1]);
  }
  long long res = p(k, n - 2 * b[m - 1]);
  for (long long i = 0; i < m; i++) {
    res = (res * fun(k, util[i])) % mod;
  }
  cout << res;
  return 0;
}
