#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
bool Finish_read;
template <class T>
inline void read(T &x) {
  Finish_read = 0;
  x = 0;
  int f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    if (ch == EOF) return;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  x *= f;
  Finish_read = 1;
}
template <class T>
inline void print(T x) {
  if (x / 10 != 0) print(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void writeln(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
  putchar('\n');
}
template <class T>
inline void write(T x) {
  if (x < 0) putchar('-');
  x = abs(x);
  print(x);
}
const int mod = 998244353;
inline int Add(const int &x, const int &y) {
  int res = x + y;
  return res >= mod ? res - mod : res;
}
inline int Sub(const int &x, const int &y) {
  int res = x - y;
  return res < 0 ? res + mod : res;
}
inline int Mul(const int &x, const int &y) { return 1ll * x * y % mod; }
inline int Pow(int x, int y = mod - 2) {
  int res = 1;
  for (x %= mod; y; x = Mul(x, x), y >>= 1)
    if (y & 1) res = Mul(res, x);
  return res;
}
int n, m, k, val[200005], dp[200005][2];
inline void solve() {
  dp[0][0] = Pow(k, n);
  for (int i = 1; i <= m; ++i)
    dp[i][0] = Add(dp[i - 1][0], Mul(dp[i - 1][1], Pow(k, val[m - i + 1]))),
    dp[i][1] = Add(dp[i - 1][1],
                   Mul(dp[i - 1][0], Pow(k, Sub(mod - 1, val[m - i + 1]))));
}
inline void output() {
  printf("%d\n", Mul(Add(dp[m][0], dp[m][1]), Pow(Pow(2, m))));
}
inline void input() {
  read(n), read(m), read(k);
  for (int i = 1; i <= m; ++i) read(val[i]);
}
int main() { input(), solve(), output(); }
