#include <bits/stdc++.h>
using namespace std;
long long fpow(long long a, long long b) {
  long long ans = 1, t = a;
  while (b) {
    if (b & 1) ans = ans * t % 998244353;
    t = t * t % 998244353;
    b >>= 1;
  }
  return ans;
}
int n, m, A;
int b[200010];
int main() {
  scanf("%d %d %d", &n, &m, &A);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  long long ans = 1;
  for (int i = 1; i <= m; i++)
    ans = (ans *
               ((long long)fpow(A, b[i] - b[i - 1]) +
                (long long)fpow(A, b[i] - b[i - 1]) *
                    (fpow(A, b[i] - b[i - 1]) - 1) % 998244353 *
                    fpow(2, 998244353 - 2) % 998244353) %
               998244353 +
           998244353) %
          998244353;
  ans = ans * fpow(A, n - b[m] - b[m]) % 998244353;
  printf("%I64d\n", ans);
  return 0;
}
