#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 100;
const int mod = (int)1e9 + 7;
const int P = (int)1e6 + 7;
vector<vector<int> > mul(vector<vector<int> > a, vector<vector<int> > b) {
  int n = ((int)(a).size()), m = ((int)(a[0]).size()), k = ((int)(b[0]).size());
  vector<vector<int> > res(n, vector<int>(k, 0));
  for (int i = (0); i <= (n - 1); ++i)
    for (int j = (0); j <= (k - 1); ++j)
      for (int t = (0); t <= (m - 1); ++t)
        res[i][j] = (res[i][j] + (a[i][t] * 1ll * b[t][j]) % mod) % mod;
  return res;
}
int n, k, b, x, cnt[10];
vector<vector<int> > binpow(vector<vector<int> > a, int n) {
  vector<vector<int> > res(x, vector<int>(x, 0));
  for (int i = (0); i <= (((int)(a).size()) - 1); ++i) {
    res[i][i] = 1;
  }
  while (n) {
    if (n & 1) res = mul(res, a);
    n >>= 1;
    a = mul(a, a);
  }
  return res;
}
int main() {
  cin >> n >> b >> k >> x;
  for (int i = (1); i <= (n); ++i) {
    int dig;
    cin >> dig;
    cnt[dig]++;
  }
  vector<vector<int> > a(x, vector<int>(x, 0));
  for (int i = (0); i <= (x - 1); ++i) {
    for (int dig = (0); dig <= (9); ++dig) {
      a[(i * 10 + dig) % x][i] += cnt[dig];
      a[(i * 10 + dig) % x][i] %= mod;
    }
  }
  a = binpow(a, b);
  cout << a[k][0];
}
