#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T>
inline bool chkmin(T &a, T b) {
  return b < a ? a = b, 1 : 0;
}
template <typename T>
inline T read() {
  register char c_;
  register T _, __;
  for (_ = 0, __ = 1, c_ = getchar(); !isdigit(c_); c_ = getchar())
    if (c_ == '-') __ = -1;
  for (; isdigit(c_); c_ = getchar()) _ = (_ << 1) + (_ << 3) + (c_ ^ 48);
  return _ * __;
}
const int maxn = 2e5 + 5, MOD = 998244353;
int n, m, alpha, b[maxn];
inline int fpm(int a, int b) {
  register int ans = 1;
  for (; b; b >>= 1, a = (long long)a * a % MOD)
    if (b & 1) ans = (long long)ans * a % MOD;
  return ans;
}
int main() {
  n = read<int>(), m = read<int>(), alpha = read<int>();
  for (register int i = (1), i_end_ = (m); i <= i_end_; ++i) b[i] = read<int>();
  int ans = fpm(alpha, n - (b[m] << 1)), inv2 = fpm(2, MOD - 2);
  for (register int i = (1), i_end_ = (m); i <= i_end_; ++i) {
    int t = fpm(alpha, b[i] - b[i - 1]);
    ans = (long long)ans *
          ((((long long)t * t % MOD + MOD - t) % MOD * inv2 % MOD + t) % MOD) %
          MOD;
  }
  printf("%d\n", ans);
  return 0;
}
