#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
void chmin(T &t, U f) {
  if (t > f) t = f;
}
template <class T, class U>
void chmax(T &t, U f) {
  if (t < f) t = f;
}
const long long mod = 1000000007;
long long N, B, K, X;
vector<vector<long long> > mul(vector<vector<long long> > A,
                               vector<vector<long long> > B) {
  vector<vector<long long> > C(A.size(), vector<long long>(B[0].size()));
  for (long long i = 0; i < (C.size()); i++) {
    for (long long j = 0; j < (C[0].size()); j++) {
      for (long long k = 0; k < (B.size()); k++) {
        C[i][j] += A[i][k] * B[k][j];
        C[i][j] %= mod;
      }
    }
  }
  return C;
}
vector<vector<long long> > mpow(vector<vector<long long> > A, long long m) {
  vector<vector<long long> > ret(A.size(), vector<long long>(A.size()));
  for (long long i = 0; i < (A.size()); i++) ret[i][i] = 1;
  while (m) {
    if (m & 1) ret = mul(ret, A);
    A = mul(A, A);
    m >>= 1;
  }
  return ret;
}
signed main() {
  cin >> N >> B >> K >> X;
  long long cnt[10] = {};
  for (long long i = 0; i < (N); i++) {
    long long a;
    cin >> a;
    cnt[a]++;
  }
  vector<vector<long long> > A(X, vector<long long>(X));
  vector<vector<long long> > p(X, vector<long long>(1));
  p[0][0] = 1;
  for (long long i = 0; i < (X); i++)
    for (long long j = 0; j < (10); j++) {
      long long d = (i * 10 + j) % X;
      A[d][i] += cnt[j];
    }
  p = mul(mpow(A, B), p);
  cout << p[K][0] << endl;
  return 0;
}
