#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int N = 500;
const long long M = 1e9 + 7;
int n, b, k, x;
map<int, int> m;
vector<long long> a;
vector<long long> conv(vector<long long> &a, vector<long long> &b) {
  int n = ((int)a.size());
  vector<long long> ans(n, 0);
  for (int i = 0; i < (int)n; ++i) {
    for (int j = 0; j < (int)n; ++j) {
      ans[(i + j) % n] = (ans[(i + j) % n] + a[i] * b[j] % M) % M;
    }
  }
  return ans;
}
vector<long long> fast_conv(vector<long long> &b, int e) {
  int n = ((int)b.size());
  vector<long long> a(n, 0);
  a[0] = 1;
  while (e) {
    if (e & 1) a = conv(a, b);
    b = conv(b, b);
    e /= 2;
  }
  return a;
}
vector<long long> expo(vector<long long> &a, int e) {
  int ex = 1, n = ((int)a.size());
  while (e--) {
    ex = (ex * 10) % x;
  }
  vector<long long> ans(n, 0);
  for (int i = 0; i < (int)n; ++i) {
    int next = (i * ex) % x;
    ans[next] = (ans[next] + a[i]) % M;
  }
  if (e == 0) {
    assert(a == ans);
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(8) << fixed;
  cin >> n >> b >> k >> x;
  a.assign(x, 0);
  int num;
  for (int i = 0; i < (int)n; ++i) {
    cin >> num;
    a[num % x]++;
  }
  int ent = 0, cic = 0, cur = 1, idx = 0;
  m[cur] = idx++;
  cur = (cur * 10) % x;
  while (!m.count(cur)) {
    m[cur] = idx++;
    cur = (cur * 10) % x;
  }
  ent = m[cur];
  cic = idx - ent;
  vector<long long> ans(x, 0);
  ans[0] = 1;
  for (int i = 0; i < (int)min(ent, b); ++i) {
    vector<long long> bb = expo(a, i);
    ans = conv(ans, bb);
  }
  if (b <= ent) {
    cout << ans[k] << '\n';
    return 0;
  }
  b -= ent;
  if (b > cic) {
    vector<long long> blo(x, 0);
    blo[0] = 1;
    for (int i = (int)ent; i <= (int)ent + cic - 1; ++i) {
      vector<long long> bb = expo(a, i);
      blo = conv(blo, bb);
    }
    int n_c = b / cic;
    blo = fast_conv(blo, n_c);
    b %= cic;
    ans = conv(ans, blo);
  }
  for (int i = (int)ent; i <= (int)ent + b - 1; ++i) {
    vector<long long> bb = expo(a, i);
    ans = conv(ans, bb);
  }
  cout << ans[k] << '\n';
}
