#include <bits/stdc++.h>
using namespace std;
map<long long int, vector<long long int> > M;
long long int n, b, k, x;
long long int digits[10];
long long int power(long long int base, long long int exp, long long int md) {
  if (exp == 0) return 1LL;
  long long int root = power(base, exp / 2, md);
  if (exp & 1LL) return (((root * root) % md) * base) % md;
  return (root * root) % md;
}
vector<long long int> unite(vector<long long int>& A, vector<long long int>& B,
                            long long int off) {
  vector<long long int> V(101, 0);
  for (long long int i = 0; i < A.size(); i++) {
    for (long long int j = 0; j < B.size(); j++) {
      long long int curr = (((i * off) % x) + j) % x;
      V[curr] = (V[curr] + ((long long int)A[i]) * ((long long int)(B[j]))) %
                1000000007LL;
      if (V[curr] >= 1000000007LL) V[curr] = V[curr] - 1000000007LL;
    }
  }
  return V;
}
set<long long int> vis;
void solve(long long int n) {
  if (vis.count(n)) return;
  vis.insert(n);
  if (n == 1) {
    vector<long long int>& V = M[n];
    V.resize(101);
    fill(V.begin(), V.begin() + x, 0);
    for (long long int i = 0; i < 10; i++) {
      V[i % x] += digits[i];
      V[i % x] = V[i % x] % 1000000007LL;
    }
  } else {
    long long int part1 = n / 2;
    long long int part2 = (n / 2) + (n % 2 == 1);
    solve(part1);
    solve(part2);
    M.insert(make_pair(n, unite(M[part1], M[part2], power(10, part2, x))));
  }
}
int main() {
  cin >> n >> b >> k >> x;
  for (long long int i = 0; i < n; i++) {
    long long int a;
    cin >> a;
    digits[a]++;
  }
  solve(b);
  cout << M[b][k] << endl;
  return 0;
}
