#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
const int N = 200005;
const int mod = 998244353;
long long fexp(long long b, long long e) {
  long long ans = 1;
  while (e) {
    if (e & 1) ans = (ans * b) % mod;
    e >>= 1;
    b = (b * b) % mod;
  }
  return ans;
}
int main() {
  int n, m, a;
  int b[N];
  scanf("%d %d %d", &n, &m, &a);
  for (int i = 0; i < m; i++) {
    scanf("%d", b + i);
  }
  long long ans = fexp(a, n - 2 * b[m - 1]);
  int ant = b[0];
  for (int i = 1; i < m; i++) {
    int aux = ant;
    ant = b[i];
    b[i] -= aux;
  }
  for (int i = 0; i < m; i++) {
    long long x = fexp(a, 2 * b[i]);
    long long p = fexp(a, b[i]);
    x = (x - p + mod) % mod;
    x = (x * fexp(2, mod - 2)) % mod;
    x = (x + p) % mod;
    ans = (ans * x) % mod;
  }
  printf("%lld\n", ans);
  return 0;
}
