#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long X = 105;
std::vector<long long> base;
long long x;
long long pwr(long long a, long long b) {
  if (b == 0) {
    return 1;
  } else if (b == 1) {
    return a % x;
  }
  long long half = pwr(a, b / 2);
  long long ret = (half * half) % x;
  if (b & 1) ret = (ret * a) % x;
  return ret;
}
vector<long long> solve(long long b) {
  if (b == 1) return base;
  vector<long long> half = solve(b / 2);
  std::vector<long long> ret;
  ret.resize(X, 0);
  long long pw10 = pwr(10, b / 2);
  for (long long i = 0; i < X; ++i)
    for (long long j = 0; j < X; ++j)
      ret[((i * pw10) % x + j) % x] =
          (ret[((i * pw10) % x + j) % x] + (half[i] * half[j]) % MOD) % MOD;
  if (b & 1) {
    vector<long long> ret2;
    ret2.resize(X, 0);
    for (long long i = 0; i < X; ++i)
      for (long long j = 0; j < X; ++j)
        ret2[((i * 10) % x + j) % x] =
            (ret2[((i * 10) % x + j) % x] + (ret[i] * base[j]) % MOD) % MOD;
    return ret2;
  }
  return ret;
}
int main() {
  long long n, b, k;
  scanf("%lld %lld %lld %lld", &n, &b, &k, &x);
  base.resize(X, 0);
  long long tmp;
  for (long long i = 0; i < n; ++i) {
    scanf("%lld", &tmp);
    ++base[tmp % x];
  }
  cout << solve(b)[k] << "\n";
  return 0;
}
