#include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1E9 + 7;
template <class T, class U>
void smin(T& a, const U& b) {
  if (a > b) a = b;
}
template <class T, class U>
void smax(T& a, const U& b) {
  if (a < b) a = b;
}
string getstr() {
  char s[200001];
  scanf("%s", s);
  return s;
}
struct mat {
  int a[100][100] = {};
  mat operator*(const mat& o) const {
    mat res;
    for (int i = (0); i < (100); ++i)
      for (int j = (0); j < (100); ++j)
        for (int k = (0); k < (100); ++k)
          res.a[i][k] = (res.a[i][k] + 1ll * a[i][j] * o.a[j][k]) % MOD;
    return res;
  }
};
int n, b, k, x;
int a[10];
mat fpow(mat b, int n) {
  mat res;
  for (int i = (0); i < (100); ++i) res.a[i][i] = 1;
  while (n) {
    if (n & 1) res = res * b;
    b = b * b;
    n >>= 1;
  }
  return res;
}
int main() {
  scanf("%d %d %d %d", &n, &b, &k, &x);
  for (int i = (0); i < (n); ++i) {
    int x;
    scanf("%d", &x);
    a[x]++;
  }
  mat m;
  for (int i = (0); i < (x); ++i) {
    int t = i * 10 % x;
    for (int j = (1); j <= (9); ++j) {
      m.a[i][(t + j) % x] += a[j];
    }
  }
  mat an = fpow(m, b);
  cout << an.a[0][k];
}
