#include <iostream>
#include <cstdio>

using namespace std;

int *input(int n) {
	int *x = new int[n];
	for (int i = 0; i < n; i++)
		scanf("%d", x + i);
	return x;
}

void output(int n, int *x) {
	for (int i = 0; i < n; i++)
		printf("%d ", x[i]);
}

int *build(int n) {
	int *x = new int[n];
	for (int i = 0; i < n; i++)
		x[i] = i + 1;
	return x;
}

int f(int b, int e) {
	b %= 998244353;
	int s = 1;
	for (int i = 0; i < e; i++)
		s = (s*b) % 998244353;
	return s;
}

int main() {
	int n, m, *a, *b, c;
	cin >> n >> m;
	a = build(n);
	b = input(m);
	cin >> c;

	for (int i = 0; i <= n - m; i++) {
		for (int j = 0; j < m; j++)
			a[i + b[j] - 1] = a[i + j];
	}
	//output(n, a);

	int s = 0;
	for (int i = 0; i < n; i++) {
		s += (f(c, i + 1)*a[i]) % 998244353;
		s %= 998244353;
	}
	cout << s;

	delete[] a;
	delete[] b;
	return 0;
}