#include <bits/stdc++.h>
using namespace std;
vector<vector<vector<long long>>> cc;
vector<vector<long long>> matrix_multiply(vector<vector<long long>> a,
                                          vector<vector<long long>> b) {
  long long x = a.size(), y = a[0].size(), z = b[0].size(), i, j, k;
  vector<vector<long long>> ans(x, vector<long long>(z, 0));
  for (i = 0; i < x; i++) {
    for (j = 0; j < z; j++)
      for (k = 0; k < y; k++)
        ans[i][j] = (ans[i][j] + a[i][k] * b[k][j]) % 1000000007;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, b, k, x, d, i, j, MAXLEVEL = 40, ans;
  cin >> n >> b >> k >> x;
  vector<long long> ct(10, 0);
  for (i = 0; i < n; i++) {
    cin >> d;
    ct[d]++;
  }
  vector<vector<long long>> a(1, vector<long long>(x, 0)),
      transfer(x, vector<long long>(x, 0)), xx;
  for (i = 0; i < x; i++) {
    for (j = 1; j <= 9; j++) {
      transfer[i][(i * 10 + j) % x] =
          (transfer[i][(i * 10 + j) % x] + ct[j]) % 1000000007;
    }
  }
  a[0][0] = 1;
  xx = transfer;
  for (i = 0; i < MAXLEVEL; i++) {
    if ((1LL << i) & b) a = matrix_multiply(a, xx);
    xx = matrix_multiply(xx, xx);
  }
  ans = a[0][k];
  cout << ans << "\n";
  return 0;
}
