#include <bits/stdc++.h>
using std::bitset;
using std::cerr;
using std::cin;
using std::cout;
using std::endl;
using std::make_pair;
using std::map;
using std::pair;
using std::priority_queue;
using std::queue;
using std::set;
using std::string;
using std::stringstream;
using std::vector;
class MyTimer {
 public:
  void reset() {}
  void report() {}
} myTimer;
template <typename T1, typename T2>
inline bool chmin(T1 &a, const T2 &b) {
  return a > b ? a = b, true : false;
}
template <typename T1, typename T2>
inline bool chmax(T1 &a, const T2 &b) {
  return a < b ? a = b, true : false;
}
inline int readint() {
  int a = 0;
  char c = getchar(), p = 0;
  while (isspace(c)) c = getchar();
  if (c == '-') p = 1, c = getchar();
  while (isdigit(c)) a = a * 10 + c - '0', c = getchar();
  return p ? -a : a;
}
inline long long readLL() {
  long long a = 0;
  char c = getchar(), p = 0;
  while (isspace(c)) c = getchar();
  if (c == '-') p = 1, c = getchar();
  while (isdigit(c)) a = a * 10 + c - '0', c = getchar();
  return p ? -a : a;
}
const int maxN = 50000 + 233;
const int maxB = 1000000000 + 233;
const int maxM = 100;
const long long P = 1000000007;
int n, b, k, m;
struct Matrix {
  long long val[maxM][maxM];
  long long *operator[](const int index) { return val[index]; }
  Matrix() { memset(val, 0, sizeof(val)); }
  static Matrix Identity(int m) {
    Matrix r;
    for (int i = 0; i < m; ++i) r[i][i] = 1;
    return r;
  }
  friend Matrix operator*(Matrix &A, Matrix &B) {
    Matrix R;
    for (int i = 0; i < m; ++i)
      for (int j = 0; j < m; ++j)
        for (int k = 0; k < m; ++k) R[i][j] = (R[i][j] + A[i][k] * B[k][j]) % P;
    return R;
  }
} A[32];
int main() {
  n = readint();
  b = readint();
  k = readint();
  m = readint();
  static int buc[maxM];
  memset(buc, 0, sizeof(buc));
  for (int i = 0; i < n; ++i) {
    buc[readint() % m]++;
  }
  for (int i = 0; i < m; ++i)
    for (int j = 0; j < m; ++j) A[0][(j * 10 + i) % m][j] += buc[i];
  for (int k = 1; k < 32; ++k) A[k] = A[k - 1] * A[k - 1];
  static long long f[maxN], g[maxN];
  memset(f, 0, sizeof(f));
  memset(g, 0, sizeof(g));
  f[0] = 1;
  for (int t = 0; t < 32; ++t)
    if (b >> t & 1) {
      memcpy(g, f, sizeof(f));
      memset(f, 0, sizeof(f));
      for (int i = 0; i < m; ++i)
        for (int j = 0; j < m; ++j) f[i] = (f[i] + g[j] * A[t][i][j]) % P;
    }
  printf("%lld\n", f[k] % P);
  return 0;
}
