#include <bits/stdc++.h>
using namespace std;
const int n0 = 2e5 + 123, mod = 998244353;
int n, m, a, b[n0];
int bp(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = (long long)res * x % mod;
    x = (long long)x * x % mod;
    y /= 2;
  }
  return res;
}
int f(long long x) { return (x * (x - 1) / 2 + x) % mod; }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m >> a;
  for (int i = 1; i <= m; i++) cin >> b[i];
  int mid = (n - b[m] + 1) - b[m] - 1;
  int ans = bp(a, mid);
  for (int i = 1; i <= m; i++) {
    ans = (long long)ans * f(bp(a, b[i] - b[i - 1])) % mod;
  }
  cout << ans;
}
