#include <bits/stdc++.h>
int ___read_tmp;
using namespace std;
unsigned long long **mmult(unsigned long long **a, unsigned long long **b) {
  unsigned long long **res = new unsigned long long *[100];
  for (int i = (0); i < (100); i++) {
    res[i] = new unsigned long long[100];
    memset(res[i], 0, 100 * sizeof(unsigned long long));
  }
  for (int i = (0); i < (100); i++) {
    for (int j = (0); j < (100); j++) {
      for (int k = (0); k < (100); k++) {
        res[i][j] = (res[i][j] + a[i][k] * b[k][j]) % 1000000007;
      }
    }
  }
  return res;
}
unsigned long long **mpwr(unsigned long long **m, int pwr) {
  if (pwr == 1) return m;
  if (pwr % 2 == 0) {
    unsigned long long **tmp = mpwr(m, pwr / 2);
    return mmult(tmp, tmp);
  } else {
    return mmult(m, mpwr(m, pwr - 1));
  }
}
unsigned long long **orig;
unsigned long long o2[100][100];
unsigned long long vec[100];
int main() {
  int n, b, x, k;
  scanf("%d %d %d %d", &n, &b, &k, &x);
  for (int i = (0); i < (n); i++) {
    vec[(scanf("%d ", &___read_tmp), ___read_tmp)]++;
  }
  orig = new unsigned long long *[100];
  for (int i = (0); i < (100); i++) {
    orig[i] = new unsigned long long[100];
    memset(orig[i], 0, sizeof(unsigned long long) * 100);
  }
  for (int i = (0); i < (100); i++) {
    for (int j = (0); j < (10); j++) {
      o2[i][(i * 10 + j) % x] += vec[j];
      orig[i][(i * 10 + j) % x] += vec[j];
    }
  }
  unsigned long long **res = mpwr(orig, b);
  unsigned long long ans = 0;
  for (int i = (0); i < (100); i++) vec[i] = 0;
  vec[0] = 1;
  for (int i = (0); i < (x); i++) {
    ans += (vec[i] * res[i][k]) % 1000000007;
  }
  printf("%I64d", ans % 1000000007);
  return 0;
}
