#include <bits/stdc++.h>
using namespace std;
template <typename T, typename T1>
ostream &operator<<(ostream &out, pair<T, T1> obj) {
  out << "(" << obj.first << "," << obj.second << ")";
  return out;
}
template <typename T, typename T1>
ostream &operator<<(ostream &out, map<T, T1> cont) {
  typename map<T, T1>::const_iterator itr = cont.begin();
  typename map<T, T1>::const_iterator ends = cont.end();
  for (; itr != ends; ++itr) out << *itr << " ";
  out << endl;
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, set<T> cont) {
  typename set<T>::const_iterator itr = cont.begin();
  typename set<T>::const_iterator ends = cont.end();
  for (; itr != ends; ++itr) out << *itr << " ";
  out << endl;
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, multiset<T> cont) {
  typename multiset<T>::const_iterator itr = cont.begin();
  typename multiset<T>::const_iterator ends = cont.end();
  for (; itr != ends; ++itr) out << *itr << " ";
  out << endl;
  return out;
}
template <typename T,
          template <typename ELEM, typename ALLOC = allocator<ELEM>> class CONT>
ostream &operator<<(ostream &out, CONT<T> cont) {
  typename CONT<T>::const_iterator itr = cont.begin();
  typename CONT<T>::const_iterator ends = cont.end();
  for (; itr != ends; ++itr) out << *itr << " ";
  out << endl;
  return out;
}
template <typename T, unsigned int N, typename CTy, typename CTr>
typename enable_if<!is_same<T, char>::value, basic_ostream<CTy, CTr> &>::type
operator<<(basic_ostream<CTy, CTr> &out, const T (&arr)[N]) {
  for (auto i = 0; i < N; ++i) out << arr[i] << " ";
  out << endl;
  return out;
}
template <typename T>
T gcd(T a, T b) {
  T min_v = min(a, b);
  T max_v = max(a, b);
  while (min_v) {
    T temp = max_v % min_v;
    max_v = min_v;
    min_v = temp;
  }
  return max_v;
}
template <typename T>
T lcm(T a, T b) {
  return (a * b) / gcd(a, b);
}
template <typename T>
T fast_exp_pow(T base, T exp, T mod) {
  long long res = 1;
  while (exp) {
    if (exp & 1) {
      res *= base;
      res %= mod;
    }
    exp >>= 1;
    base *= base;
    base %= mod;
  }
  return res;
}
long long N, B, K, X, val, pos;
long long counts[15], matrix[105][105], dp_ways[105][105];
void matrix_multiplication(long long arr_1[][105], long long arr_2[][105],
                           int N, int M) {
  long long temp[105][105];
  memset(temp, 0, sizeof(temp));
  for (auto i = 0; i < N; ++i)
    for (auto j = 0; j < M; ++j)
      for (auto k = 0; k < N; ++k)
        temp[i][j] = (temp[i][j] + (arr_1[i][k] * arr_2[k][j]) % 1000000007) %
                     1000000007;
  for (auto i = 0; i < N; ++i)
    for (auto j = 0; j < M; ++j) arr_2[i][j] = temp[i][j];
}
void matrix_exponent() {
  while (B) {
    if (B & 1) matrix_multiplication(matrix, dp_ways, X, 1);
    matrix_multiplication(matrix, matrix, X, X);
    B >>= 1;
  }
}
int main() {
  scanf("%I64d%I64d%I64d%I64d", &N, &B, &K, &X);
  for (auto i = 0; i < N; ++i) {
    scanf("%I64d", &val);
    ++counts[val];
  }
  for (auto i = 0; i < X; ++i)
    for (auto j = 1; j < 10; ++j) {
      pos = (10 * i + j) % X;
      matrix[pos][i] = (matrix[pos][i] + counts[j]) % 1000000007;
    }
  dp_ways[0][0] = 1;
  matrix_exponent();
  printf("%I64d", dp_ways[K][0]);
  return 0;
}
