#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 400005;
int x, n, b, k;
struct mat {
  long long a[100][100];
  mat() { memset(a, 0, sizeof(a)); }
  mat operator*(const mat &b) const {
    mat ret;
    for (int i = 0; i < x; ++i)
      for (int j = 0; j < x; ++j)
        for (int k = 0; k < x; ++k)
          ret.a[i][j] = (ret.a[i][j] + a[i][k] * b.a[k][j]) % mod;
    return ret;
  }
  mat operator+(const mat &b) const {
    mat ret;
    for (int i = 0; i < x; ++i)
      for (int j = 0; j < 1; ++j)
        for (int k = 0; k < x; ++k)
          ret.a[i][j] = (ret.a[i][j] + a[i][k] * b.a[k][j]) % mod;
    return ret;
  }
};
void go() {
  cin >> n >> b >> k >> x;
  int cnt[10] = {};
  for (int i = 1; i < n + 1; i++) {
    int x;
    cin >> x;
    cnt[x]++;
  }
  mat mul;
  mat ans;
  ans.a[0][0] = 1;
  for (int i = 0; i < x; i++) {
    for (int j = 1; j <= 9; j++) {
      mul.a[(i * 10 + j) % x][i] += cnt[j];
    }
  }
  while (b) {
    if (b & 1) {
      ans = mul + ans;
    }
    mul = mul * mul;
    b >>= 1;
  }
  cout << ans.a[k][0] << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int c = 0;
  int t;
  if (!c) {
    t = 1;
  } else {
    cin >> t;
  }
  while (t--) {
    go();
  }
}
