#include <bits/stdc++.h>
using namespace std;
const int md = 1e9 + 7;
struct Matrix {
  int n_len, m_len;
  long long mat[110][110];
  void initial(int nn, int mm) {
    n_len = nn;
    m_len = mm;
    memset(mat, 0, sizeof(mat));
  }
  Matrix operator*(const Matrix &a) {
    Matrix tmp;
    tmp.initial(n_len, a.m_len);
    for (int i = 0; i < n_len; ++i)
      for (int j = 0; j < a.m_len; ++j) {
        long long sum = 0;
        for (int k = 0; k < m_len; ++k)
          sum = (sum + mat[i][k] * a.mat[k][j] % md) % md;
        tmp.mat[i][j] = sum;
      }
    return tmp;
  }
};
int n, blo, kk, xx;
int num_c[15];
void init() {
  int a;
  cin >> n >> blo >> kk >> xx;
  memset(num_c, 0, sizeof(num_c));
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a);
    ++num_c[a];
  }
  Matrix beg, ans, now;
  beg.initial(xx, xx);
  ans.initial(xx, 1);
  now.initial(xx, xx);
  ans.mat[0][0] = 1;
  for (int i = 0; i < xx; ++i)
    for (int t = 1; t <= 9; ++t) {
      beg.mat[(i * 10 + t) % xx][i] += num_c[t];
      beg.mat[(i * 10 + t) % xx][i] %= md;
      now.mat[i][i] = 1;
    }
  while (blo > 0) {
    if (blo & 1) now = now * beg;
    beg = beg * beg;
    blo >>= 1;
  }
  ans = now * ans;
  cout << ans.mat[kk][0] << "\n";
  return;
}
int main() {
  init();
  return 0;
}
