#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int n, m, A, b[200005];
int ksm(int x, int k) {
  if (k == 0) return 1;
  long long s = ksm(x, k / 2);
  s = s * s % mod;
  if (k & 1) s = s * x % mod;
  return s;
}
int main() {
  scanf("%d%d%d", &n, &m, &A);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  long long ans = ksm(A, n - b[m] * 2);
  for (int i = m; i > 1; i--) b[i] -= b[i - 1];
  for (int i = 1; i <= m; i++) {
    int x = ksm(A, b[i]);
    ans = ans * ((long long)x * (x + 1) / 2 % mod) % mod;
  }
  cout << ans << endl;
}
