#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
const long long mod = 998244353;
long long a[N];
long long n, m, k;
long long pw(long long n, long long k) {
  if (!k) return 1;
  long long res = pw(n, k >> 1);
  res = res * res % mod;
  if (k & 1) return res * n % mod;
  return res;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
  }
  long long ans = 1;
  for (long long i = 1; i <= m; i++) {
    long long num = a[i] - a[i - 1];
    (ans *= pw(k, 2 * num) + pw(k, num)) %= mod;
    if (ans < 0) ans += mod;
  }
  (ans *= pw(k, n - 2 * a[m])) %= mod;
  (ans *= pw(pw(2, m), mod - 2)) %= mod;
  cout << ans;
  return 0;
}
