#include <iostream>
#include <algorithm>
using namespace std;
const int mod = 1000000007;
int N, K, X, s[2509], dp[5009][10009];
int main() {
dp[0][1] = 1;
for (int i = 1; i <= 5000; i++) {
int sum = 0;
for (int j = 1; j <= 10000; j++) {
int lim = i + i % 2;
sum += dp[i - 1][j - 1];
if (j - lim >= 1) sum -= dp[i - 1][j - lim - 1];
if (sum >= mod) sum -= mod;
if (sum < 0) sum += mod;
dp[i][j] = sum;
if (j <= i + 1) dp[i][j]++;
if (dp[i][j] >= mod) dp[i][j] -= mod;
}
}
cin >> N >> K >> X;
for (int i = 0; i < K; i++) cin >> s[i];
int ret = 1;
for (int i = 0; i < K - 1; i++) ret = 1LL * ret * (X - i >= 1 ? dp[2 * X - 2 * i - 1][s[i + 1] - s[i]] : 0) % mod;
cout << ret << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpjb25zdCBpbnQgbW9kID0gMTAwMDAwMDAwNzsKaW50IE4sIEssIFgsIHNbMjUwOV0sIGRwWzUwMDldWzEwMDA5XTsKaW50IG1haW4oKSB7CglkcFswXVsxXSA9IDE7Cglmb3IgKGludCBpID0gMTsgaSA8PSA1MDAwOyBpKyspIHsKCQlpbnQgc3VtID0gMDsKCQlmb3IgKGludCBqID0gMTsgaiA8PSAxMDAwMDsgaisrKSB7CgkJCWludCBsaW0gPSBpICsgaSAlIDI7CgkJCXN1bSArPSBkcFtpIC0gMV1baiAtIDFdOwoJCQlpZiAoaiAtIGxpbSA+PSAxKSBzdW0gLT0gZHBbaSAtIDFdW2ogLSBsaW0gLSAxXTsKCQkJaWYgKHN1bSA+PSBtb2QpIHN1bSAtPSBtb2Q7CgkJCWlmIChzdW0gPCAwKSBzdW0gKz0gbW9kOwoJCQlkcFtpXVtqXSA9IHN1bTsKCQkJaWYgKGogPD0gaSArIDEpIGRwW2ldW2pdKys7CgkJCWlmIChkcFtpXVtqXSA+PSBtb2QpIGRwW2ldW2pdIC09IG1vZDsKCQl9Cgl9CgljaW4gPj4gTiA+PiBLID4+IFg7Cglmb3IgKGludCBpID0gMDsgaSA8IEs7IGkrKykgY2luID4+IHNbaV07CglpbnQgcmV0ID0gMTsKCWZvciAoaW50IGkgPSAwOyBpIDwgSyAtIDE7IGkrKykgcmV0ID0gMUxMICogcmV0ICogKFggLSBpID49IDEgPyBkcFsyICogWCAtIDIgKiBpIC0gMV1bc1tpICsgMV0gLSBzW2ldXSA6IDApICUgbW9kOwoJY291dCA8PCByZXQgPDwgZW5kbDsKCXJldHVybiAwOwp9