#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353, maxn = 2e5 + 100;
int b[maxn];
int power(int a, int b) {
  if (b == 0) return 1;
  int t = power(a, b >> 1);
  t = (1LL * t * t) % mod;
  if (b & 1LL) t = (1LL * t * a) % mod;
  return t;
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, c;
  cin >> n >> m >> c;
  for (int i = 0; i < m; i++) cin >> b[i];
  int mid_block = n - 2 * b[m - 1];
  int ans = power(c, mid_block);
  int div2 = power(2, mod - 2);
  for (int i = 0; i < m; i++) {
    int block = b[i];
    if (i > 0) block -= b[i - 1];
    int Tmp = power(c, block);
    Tmp = (1LL * Tmp * (Tmp + 1)) % mod;
    Tmp = (1LL * Tmp * div2) % mod;
    ans = (1LL * ans * Tmp) % mod;
  }
  cout << ans << endl;
  return 0;
}
