#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int power(int v, int u) {
  if (!u) return 1;
  int ok = power(v, u >> 1);
  if (u & 1) return (long long)ok * ok % mod * v % mod;
  return (long long)ok * ok % mod;
}
const int maxm = 2e5;
int b[maxm + 10];
int main() {
  int n, m, A;
  scanf("%d%d%d", &n, &m, &A);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  int ans = 1;
  int inv2 = power(2, mod - 2);
  for (int i = 1; i <= m; i++)
    ans = (long long)ans *
          (((long long)power(A, 2 * (b[i] - b[i - 1])) +
            power(A, b[i] - b[i - 1])) %
           mod * inv2 % mod) %
          mod;
  ans = (long long)ans * power(A, n - b[m] - b[m]) % mod;
  printf("%d\n", ans);
  return 0;
}
