#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T BM(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T mdINV(T a, T M) {
  return BM(a, M - 2, M);
}
template <class T>
inline T PW(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
template <class T>
string NTS(T Number) {
  stringstream ss;
  ss << Number;
  return ss.str();
}
template <class T>
T stringtonumber(const string& Text) {
  istringstream ss(Text);
  T result;
  return ss >> result ? result : 0;
}
template <class T>
bool ISLEFT(T a, T b, T c) {
  if (((a.first.first - b.first.first) * (b.second.second - c.second.second) -
       (b.first.first - c.first.first) * (a.second.second - b.second.second)) <
      0.0)
    return 1;
  else
    return 0;
}
long long int n, b, k, first;
long long int a[100000 + 2];
const long long int SZ = 101;
struct matr {
  long long int M[SZ][SZ];
  void ZERO() {
    for (long long int i = 0; i < SZ; ++i) fill(M[i], M[i] + SZ, 0);
  }
  void ONE() {
    ZERO();
    for (long long int i = 0; i < SZ; ++i) M[i][i] = 1;
  }
  matr mul(const matr& w) {
    matr ret;
    ret.ZERO();
    for (long long int i = 0; i < SZ; ++i)
      for (long long int j = 0; j < SZ; ++j)
        for (long long int k = 0; k < SZ; ++k) {
          ret.M[i][j] += (M[i][k] * 1LL * w.M[k][j]) % 1000000007ll;
          if (ret.M[i][j] >= 1000000007ll) ret.M[i][j] -= 1000000007ll;
        }
    return ret;
  }
};
matr POW(matr w, long long int step) {
  matr ret;
  ret.ONE();
  for (; step > 0ll; step >>= 1ll, w = w.mul(w))
    if (step & 1ll) ret = w.mul(ret);
  return ret;
}
matr M;
int main() {
  scanf("%lld%lld%lld", &n, &b, &k);
  scanf("%lld", &first);
  for (long long int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  M.ZERO();
  for (long long int i = 0; i < first; i++) {
    for (long long int j = 1; j <= n; j++) {
      long long int x1 = (i * 10 + a[j]) % first;
      M.M[x1][i]++;
    }
  }
  M = POW(M, b);
  printf("%lld\n", M.M[k][0]);
  return 0;
}
