#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
ll hell = 1e9 + 7;
ll n, b, k, x;
vector<vector<ll>> v, id;
vector<vector<ll>> mul(vector<vector<ll>> a, vector<vector<ll>> b) {
  vector<vector<ll>> ans;
  for (ll i = 0; i < x; ++i) {
    vector<ll> tmp(x, 0);
    ans.push_back(tmp);
    for (ll j = 0; j < x; ++j) {
      for (ll k = 0; k < x; ++k) {
        ans[i][j] += (a[i][k] * b[k][j]) % (hell);
        ans[i][j] %= hell;
      }
    }
  }
  return ans;
}
vector<vector<ll>> pp(vector<vector<ll>> a, ll x) {
  if (x == 0) return id;
  if (x % 2 == 0) {
    return pp(mul(a, a), x / 2);
  } else
    return mul(a, pp(mul(a, a), x / 2));
}
void IDD() {
  for (ll i = 0; i < x; ++i) {
    vector<ll> tmp(x);
    id.push_back(tmp);
    for (ll j = 0; j < x; ++j) {
      if (i == j) id[i][j] = 1;
    }
  }
}
int main() {
  cin >> n >> b >> k >> x;
  ll a[n];
  for (ll i = 0; i < n; ++i) cin >> a[i];
  for (ll i = 0; i < x; ++i) {
    vector<ll> tmp(x);
    v.push_back(tmp);
  }
  for (ll i = 0; i < n; ++i) {
    for (ll j = 0; j < x; ++j) {
      v[(j * 10 + a[i]) % x][j]++;
    }
  }
  IDD();
  v = pp(v, b);
  cout << (v[k][0]) % (hell);
  return 0;
}
