#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int N = 2e5;
const int mod = 998244353;
int n, m, k, b[N + 7];
int Pow(int a, int first) {
  if (!a) return 0;
  int res = 1;
  for (; first; a = (long long)a * a % mod, first >>= 1)
    if (first & 1) res = (long long)res * a % mod;
  return res;
}
int main() {
  scanf("%d%d%d", &n, &m, &k), k %= mod;
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  int res = 1;
  for (int i = 1; i <= m; i++)
    res = (long long)res * (Pow(k, b[i] - b[i - 1]) + 1) % mod;
  res = (long long)res * Pow(k, n - b[m]) % mod;
  res = (long long)res * Pow(Pow(2, m), mod - 2) % mod;
  printf("%d\n", res);
  return 0;
}
