#include <bits/stdc++.h>
using namespace std;
long long n, b, k, x;
long long mod = 1000000007;
long long mul(long long a, long long b) {
  a = a % mod;
  b = b % mod;
  return a * b % mod;
}
long long add(long long a, long long b) { return (a + b) % mod; }
vector<vector<long long> > t;
vector<vector<long long> > mat_mul(vector<vector<long long> > a,
                                   vector<vector<long long> > b) {
  long long m = (long long)a.size();
  long long r = (long long)b.size();
  long long n = (long long)b[0].size();
  vector<vector<long long> > re(m, vector<long long>(n, 0));
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) {
      for (long long k = 0; k < r; k++) {
        re[i][j] = add(re[i][j], mul(a[i][k], b[k][j]));
      }
    }
  }
  return re;
}
vector<vector<long long> > mat_pow(vector<vector<long long> > a,
                                   long long pow) {
  if (pow == 0LL) {
    long long l = (long long)a.size();
    vector<vector<long long> > re(l, vector<long long>(l, 0));
    for (long long i = 0; i < l; i++) {
      re[i][i] = 1;
    }
    return re;
  }
  vector<vector<long long> > temp = mat_pow(a, pow / 2);
  vector<vector<long long> > re = mat_mul(temp, temp);
  if (pow % 2) {
    re = mat_mul(re, a);
  }
  return re;
}
int main() {
  vector<long long> a(10, 0);
  cin >> n >> b >> k >> x;
  for (int i = 0; i < n; i++) {
    int y;
    scanf("%d", &y);
    a[y]++;
  }
  t.assign(x, vector<long long>(x, 0));
  for (long long i = 0; i < x; i++) {
    for (long long j = 1; j <= 9; j++) {
      t[i][(i * 10 + j) % x] += a[j];
    }
  }
  vector<vector<long long> > re = mat_pow(t, b - 1);
  vector<vector<long long> > dp(1, vector<long long>(x, 0));
  for (long long i = 1; i <= 9; i++) {
    dp[0][i % x] += a[i];
  }
  dp = mat_mul(dp, re);
  cout << dp[0][k] << endl;
  return 0;
}
