#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
int sum(int a, int b) { return (a % MOD + b % MOD) % MOD; }
int mul(int a, int b) {
  return ((long long)(a % MOD) * (long long)(b % MOD)) % MOD;
}
int powmod(int a, int n) {
  if (n == 0) return 1;
  int q = powmod(a, n / 2);
  q = mul(q, q);
  if (n % 2 == 1) q = mul(q, a);
  return q;
}
int cnt(int a, int k) {
  int ak = powmod(a, k);
  return mul(mul(ak, ak + 1), (MOD + 1) / 2);
}
int main() {
  int n, m, A;
  cin >> n >> m >> A;
  vector<int> k(m);
  for (int i = 0; i < m; i++) {
    cin >> k[i];
  }
  int ans = cnt(A, k[0]);
  for (int i = 1; i < m; i++) {
    ans = mul(ans, cnt(A, k[i] - k[i - 1]));
  }
  ans = mul(ans, powmod(A, n - 2 * k[m - 1]));
  cout << ans;
  return 0;
}
