#include <bits/stdc++.h>
using namespace std;
const int M = 998244353;
const int C = 200010;
int n, m, a, b[C];
int fp(int x, int y) {
  int ret = 1;
  for (; y; y >>= 1, x = (long long)x * x % M)
    if (y & 1) ret = (long long)ret * x % M;
  return ret;
}
int D(int x) { return x & 1 ? (x + M) >> 1 : x >> 1; }
int cnt(int x) {
  int tmp = fp(a, x);
  return D(((long long)tmp * tmp + tmp) % M);
}
int main() {
  scanf("%d%d%d", &n, &m, &a);
  for (int i = 1; i <= m; ++i) scanf("%d", &b[i]);
  int ans = fp(a, n - b[m] * 2);
  for (int i = 1; i <= m; ++i) ans = (long long)ans * cnt(b[i] - b[i - 1]) % M;
  cout << ans;
}
