#include <bits/stdc++.h>
using namespace std;
const long long INF_MAX = 1e9, MOD = 1e9 + 7;
const long long INF = 1e18;
long long n, m, mod = 998244353, a;
long long qpow(long long a, long long b) {
  long long s = 1;
  while (b) {
    if (b % 2) s = (s * a) % mod;
    b /= 2;
    a = (a * a) % mod;
  }
  return s;
}
long long repeat(long long a, long long n) {
  long long palindrome = qpow(a, n / 2);
  long long non_palindrome = (qpow(a, n) - palindrome + mod) % mod;
  return (palindrome + non_palindrome * qpow(2, mod - 2) % mod) % mod;
}
int main() {
  cin >> n >> m >> a;
  long long prev, b = 0, ans = 1;
  for (int i = 0; i < m; i++) {
    prev = b;
    scanf("%lld", &b);
    ans = ans * repeat(a, 2 * (b - prev)) % mod;
  }
  ans = ans * qpow(a, n - 2 * b) % mod;
  cout << ans;
}
