#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
long long MODSQ = 1000000007ll * 1000000007ll;
long long mul_res[101][101];
void multiply(long long a[][101], long long b[][101]) {
  memset(mul_res, 0, sizeof mul_res);
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 101; j++) {
      for (int k = 0; k < 101; k++) {
        mul_res[i][j] = (mul_res[i][j] + a[i][k] * b[k][j]);
        if (mul_res[i][j] >= MODSQ) mul_res[i][j] -= MODSQ;
      }
      mul_res[i][j] %= 1000000007ll;
    }
  }
}
long long big_res[101][101];
long long init[101][101];
void matrix_expo(long long n) {
  if (n == 0) {
    memset(big_res, 0, sizeof big_res);
    for (int i = (0); i < (101); ++i) big_res[i][i] = 1;
    return;
  }
  if (n % 2 == 0) {
    matrix_expo(n / 2);
    multiply(big_res, big_res);
    for (int i = (0); i < (101); ++i) {
      for (int j = (0); j < (101); ++j) big_res[i][j] = mul_res[i][j];
    }
  } else {
    matrix_expo(n - 1);
    multiply(big_res, init);
    for (int i = (0); i < (101); ++i) {
      for (int j = (0); j < (101); ++j) big_res[i][j] = mul_res[i][j];
    }
  }
}
int cnt[11];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, b, k, x;
  cin >> n >> b >> k >> x;
  for (int i = (0); i < (n); ++i) {
    int a;
    cin >> a;
    cnt[a]++;
  }
  for (int i = (0); i < (x); ++i) {
    int v = (i * 10) % x;
    for (int j = (0); j < (10); ++j) {
      init[i][(v + j) % x] += cnt[j];
    }
  }
  matrix_expo(b);
  cout << big_res[0][k] << endl;
}
