#include <bits/stdc++.h>
using namespace std;
const int OO = 1e9;
set<vector<int>> st;
vector<int> b;
void brute(vector<int> cur) {
  st.insert(cur);
  for (auto el : b) {
    vector<int> cp = cur;
    for (int i = 0; i < el; i++) {
      cp[i] = cur[cur.size() - 1 - i];
    }
    for (int i = 0; i < el; i++) {
      cp[cur.size() - 1 - i] = cur[i];
    }
    if (st.find(cp) == st.end()) brute(cp);
  }
}
const int MOD = 998244353;
long long pow1(long long n, long long p) {
  if (p == 0) return 1;
  return (p & 1) ? n * pow1(n, p - 1) % MOD : pow1(n * n % MOD, p / 2);
}
int main() {
  int n, m, sz;
  cin >> n >> m >> sz;
  vector<int> b(m);
  for (int i = 0; i < m; i++) scanf("%d", &b[i]);
  long long res[m + 1];
  res[0] = 1;
  for (int i = 1; i <= m; i++) {
    int x = b[i - 1] - (i - 1 ? b[i - 2] : 0);
    long long mm = pow1(sz, x);
    res[i] =
        res[i - 1] * mm % MOD + res[i - 1] * ((mm) * (mm - 1) / 2 % MOD) % MOD;
    res[i] %= MOD;
  }
  cout << res[m] * pow1(sz, n - b.back() * 2) % MOD;
  return 0;
  b.push_back(2);
  b.push_back(4);
  b.push_back(5);
  brute({1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
  for (auto v : st) {
    for (auto el : v) {
      cout << el << ' ';
    }
    cout << endl;
  }
  return 0;
}
