#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using ld = long double;
using pii = pair<int, int>;
const ll M = (ll)1e9 + 7;
struct mat {
  vector<vector<ll>> a;
  mat(int k, int n) : a(n, vector<ll>(n, 0)) {
    for (int i = 0; i < n; i++) a[i][i] = k;
  }
  mat operator*(const mat &o) const {
    mat ans(0, a.size());
    for (int i = 0; i < a.size(); i++)
      for (int j = 0; j < a.size(); j++)
        for (int k = 0; k < a.size(); k++)
          ans.a[i][j] = (ans.a[i][j] + a[i][k] * o.a[k][j]) % M;
    return ans;
  }
  mat operator^(ll n) const {
    mat ans(1, a.size());
    mat curr = *this;
    while (n) {
      if (n & 1) ans = ans * curr;
      curr = curr * curr;
      n >>= 1;
    }
    return ans;
  }
};
void solve() {
  int n, b, k, x;
  cin >> n >> b >> k >> x;
  vi cnt(10);
  for (int i = 0; i < n; i++) {
    int d;
    cin >> d;
    cnt[d]++;
  }
  mat m(0, x);
  for (int i = 0; i < 10; i++)
    for (int j = 0; j < x; j++) {
      ll d = (j * 10 + i) % x;
      m.a[d][j] += cnt[i];
      m.a[d][j] %= M;
    }
  m = m ^ b;
  cout << m.a[k][0] << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
