#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e2 + 10;
const int mod = 1e9 + 7;
int n, b, k, x;
int dp[2][maxn];
void muldp(int *dest, int *src, long long fac) {
  static int tmp[maxn];
  memset(tmp, 0, sizeof tmp);
  for (int i = 0; i < x; ++i) {
    for (int j = 0; j < x; ++j) {
      int c = (i * fac + j) % x;
      tmp[c] = (tmp[c] + dest[i] * (src[j] + 0LL)) % mod;
    }
  }
  memcpy(dest, tmp, sizeof(*dest) * (x + 4));
}
int solve() {
  long long fac = 10;
  while ((b & 1) == 0) {
    muldp(dp[1], dp[1], fac);
    fac = fac * fac % x;
    b >>= 1;
  }
  memcpy(dp[0], dp[1], sizeof *dp);
  b >>= 1;
  while (b > 0) {
    muldp(dp[1], dp[1], fac);
    fac = fac * fac % x;
    if (b & 1) muldp(dp[0], dp[1], fac);
    b >>= 1;
  }
  return dp[0][k];
}
int main() {
  while (scanf("%d%d%d%d", &n, &b, &k, &x) == 4) {
    memset(dp, 0, sizeof dp);
    for (int i = 0; i < n; ++i) {
      int t;
      scanf("%d", &t);
      ++dp[1][t % x];
    }
    printf("%d\n", solve());
  }
  return 0;
}
