#include <bits/stdc++.h>
using namespace std;
long long MOD = 998244353;
long long MAX = 9223372036854775807;
long long power(long long a, long long b) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2) {
      x = (x * y) % MOD;
    }
    y = (y * y) % MOD;
    b /= 2;
  }
  return x % MOD;
}
long long n, m, a;
long long f(long long x) {
  long long curr = power(a, x);
  long long temp = (curr * (curr - 1)) % MOD;
  temp = (temp + MOD) % MOD;
  temp = (temp * power(2, MOD - 2)) % MOD;
  long long ans = (temp + curr) % MOD;
  ans = (ans + MOD) % MOD;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  ;
  cin >> n >> m >> a;
  long long b[m];
  for (int i = 0; i < m; ++i) {
    cin >> b[i];
  }
  long long ans = power(a, n - 2 * b[m - 1]);
  for (int i = 0; i < m; ++i) {
    if (i)
      ans = (ans * f(b[i] - b[i - 1])) % MOD;
    else
      ans = (ans * f(b[0])) % MOD;
  }
  cout << ans << '\n';
  ;
  return 0;
}
