#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
int n, b, k, x;
struct A {
  long long m[105][105];
} a, E;
inline A mul(const A& p, const A& q) {
  A res;
  for (int i = 0; i < x; i++)
    for (int j = 0; j < x; j++) {
      res.m[i][j] = 0;
      for (int l = 0; l < x; l++)
        res.m[i][j] = (res.m[i][j] + p.m[i][l] * q.m[l][j] % M) % M;
    }
  return res;
}
inline void qpow(int bb) {
  while (bb) {
    if (bb & 1) {
      E = mul(E, a);
    }
    a = mul(a, a);
    bb >>= 1;
  }
  printf("%lld\n", E.m[0][k]);
}
int main() {
  scanf("%d%d%d%d", &n, &b, &k, &x);
  for (int i = 0; i < x; i++) E.m[i][i] = 1;
  for (int i = 1; i <= n; i++) {
    int lj;
    scanf("%d", &lj);
    for (int j = 0; j < x; j++) a.m[j][(j * 10 % x + lj % x) % x]++;
  }
  qpow(b);
  return 0;
}
