#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void amin(T& x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T& x, U y) {
  if (x < y) x = y;
}
template <int MOD>
struct ModInt {
  static const int Mod = MOD;
  unsigned x;
  ModInt() : x(0) {}
  ModInt(signed sig) {
    int sigt = sig % MOD;
    if (sigt < 0) sigt += MOD;
    x = sigt;
  }
  ModInt(signed long long sig) {
    int sigt = sig % MOD;
    if (sigt < 0) sigt += MOD;
    x = sigt;
  }
  int get() const { return (int)x; }
  ModInt& operator+=(ModInt that) {
    if ((x += that.x) >= MOD) x -= MOD;
    return *this;
  }
  ModInt& operator-=(ModInt that) {
    if ((x += MOD - that.x) >= MOD) x -= MOD;
    return *this;
  }
  ModInt& operator*=(ModInt that) {
    x = (unsigned long long)x * that.x % MOD;
    return *this;
  }
  ModInt operator+(ModInt that) const { return ModInt(*this) += that; }
  ModInt operator-(ModInt that) const { return ModInt(*this) -= that; }
  ModInt operator*(ModInt that) const { return ModInt(*this) *= that; }
};
struct Matrix {
  static const int MaxN = 100;
  int hei, wid;
  ModInt<1000000007> v[MaxN][MaxN];
  Matrix() {}
  Matrix(int n, int m) : hei(n), wid(m) { memset(v, 0, sizeof(v)); }
  inline int height() const { return hei; }
  inline int width() const { return wid; }
  inline ModInt<1000000007>& at(int i, int j) { return v[i][j]; }
  inline const ModInt<1000000007>& at(int i, int j) const { return v[i][j]; }
  static Matrix identity(int n) {
    Matrix A(n, n);
    for (int(i) = 0; (i) < (int)(n); ++(i)) A.at(i, i) = 1;
    return A;
  }
  inline static Matrix identity(const Matrix& A) {
    return identity(A.height());
  }
  Matrix& operator*=(const Matrix& B) {
    int n = height(), m = B.width(), p = B.height();
    assert(p == width());
    const unsigned(*b)[MaxN] = reinterpret_cast<const unsigned(*)[MaxN]>(B.v);
    ModInt<1000000007> w[MaxN][MaxN];
    unsigned long long pp = (1ULL << 32) % ModInt<1000000007>::Mod;
    for (int(i) = 0; (i) < (int)(n); ++(i)) {
      const unsigned* ai = reinterpret_cast<const unsigned*>(v[i]);
      for (int(j) = 0; (j) < (int)(m); ++(j)) {
        unsigned x0 = 0;
        unsigned long long x1 = 0;
        for (int(k) = 0; (k) < (int)(p); ++(k)) {
          unsigned long long y = (unsigned long long)ai[k] * b[k][j];
          unsigned long long t = x0 + y;
          x1 += t >> 32;
          x0 = t & 0xffffffff;
        }
        w[i][j].x =
            (x0 + x1 % ModInt<1000000007>::Mod * pp) % ModInt<1000000007>::Mod;
      }
    }
    memcpy(v, w, sizeof(v));
    return *this;
  }
};
Matrix operator^(const Matrix& t, long long k) {
  Matrix A = t, B = Matrix::identity(t);
  while (k) {
    if (k & 1) B *= A;
    A *= A;
    k >>= 1;
  }
  return B;
}
int main() {
  int n;
  int b;
  int k;
  int x;
  while (~scanf("%d%d%d%d", &n, &b, &k, &x)) {
    int cnt[10] = {};
    for (int(i) = 0; (i) < (int)(n); ++(i)) {
      int d;
      scanf("%d", &d);
      ++cnt[d];
    }
    Matrix A(x, x);
    for (int(i) = 0; (i) < (int)(x); ++(i))
      for (int(d) = 0; (d) < (int)(10); ++(d))
        A.at(i, (i * 10 + d) % x) += cnt[d];
    Matrix v(1, x);
    v.at(0, 0) = 1;
    v *= A ^ b;
    ModInt<1000000007> ans = v.at(0, k);
    printf("%d\n", ans.get());
  }
  return 0;
}
