#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
int n, m, nChar, b[maxn];
const int mod = 998244353;
int P(int a, int b) {
  if (b == 0) return 1;
  int r = P(a, b / 2);
  if (b & 1) return (long long)r * r % mod * a % mod;
  return (long long)r * r % mod;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if (fopen(""
            ".INP",
            "r"))
    freopen(
        ""
        ".INP",
        "r", stdin),
        freopen(
            ""
            ".OUT",
            "w", stdout);
  cin >> n >> m >> nChar;
  for (int i = 1; i <= m; ++i) cin >> b[i];
  int res = 1;
  for (int i = 1; i <= m; ++i) {
    int k = P(nChar, b[i] - b[i - 1]);
    res = res * (((long long)k * (k + 1) / 2) % mod) % mod;
    if (res >= mod) res -= mod;
    if (res < 0) res += mod;
  }
  res = (long long)res * P(nChar, n - 2 * b[m]) % mod;
  cout << res % mod;
}
