#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
const int N = 200005;
const long long mod = 998244353;
long long ksm(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
long long b[N];
int main() {
  int n = read(), m = read();
  long long A = read();
  for (int i = 1; i <= m; ++i) b[i] = read();
  long long ans = 1, inv2 = ksm(2, mod - 2);
  for (int i = 1; i <= m; ++i) {
    long long L = b[i] - b[i - 1];
    long long tmp = ksm(A, L);
    ans = ans * tmp % mod * (tmp + 1) % mod;
    ans = ans * inv2 % mod;
  }
  ans = ans * ksm(A, n - b[m] - b[m]) % mod;
  cout << ans;
  return 0;
}
