#include <bits/stdc++.h>
static constexpr int MOD = 1e9 + 7;
static constexpr int INF = std::numeric_limits<int>::max();
static constexpr int MAXN = 150;
template <class T>
T madd(T a, T b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
template <class T>
T mmul(T a, T b) {
  return (1LL * a * b) % MOD;
}
template <class T>
class matrix {
 private:
  T** mat;
  int dim;

 public:
  static matrix identity(int d) {
    matrix result(d);
    for (int i = 0; i < d; i++) result.at(i, i) = 1;
    return result;
  }
  matrix(int d) : dim(d) {
    mat = new T*[d];
    for (int i = 0; i < d; i++) {
      mat[i] = new T[d];
      std::fill(mat[i], mat[i] + d, 0);
    }
  }
  matrix(const matrix& m) : dim(m.dim) {
    mat = new T*[dim];
    for (int i = 0; i < dim; i++) {
      mat[i] = new T[dim];
      std::copy(m.mat[i], m.mat[i] + dim, mat[i]);
    }
  }
  matrix(matrix&& m) : dim(m.dim) {
    mat = m.mat;
    m.mat = nullptr;
  }
  ~matrix() {
    for (int i = 0; i < dim; i++) delete mat[i];
    delete mat;
  }
  const T& at(int i, int j) const { return mat[i][j]; }
  T& at(int i, int j) { return mat[i][j]; }
  int size() const { return dim; }
  matrix operator*(const matrix& other) {
    matrix result(dim);
    for (int i = 0; i < dim; i++) {
      for (int j = 0; j < dim; j++) {
        T& ref = result.at(i, j);
        for (int k = 0; k < dim; k++) {
          ref = madd(ref, mmul(this->at(i, k), other.at(k, j)));
        }
      }
    }
    return result;
  }
};
template <class T>
static matrix<T> pow(const matrix<T>& a, long long n) {
  if (n == 0) return matrix<T>::identity(a.size());
  matrix<T> aleksandru = pow(a, n / 2);
  if (n % 2 == 0) {
    return aleksandru * aleksandru;
  } else {
    return aleksandru * aleksandru * a;
  }
}
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, b, k, x;
  std::cin >> n >> b >> k >> x;
  matrix<int> mat(x);
  std::vector<int> luvers;
  std::copy_n(std::istream_iterator<int>(std::cin), n,
              std::back_inserter(luvers));
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < luvers.size(); j++) {
      mat.at(i, (i * 10 + luvers[j]) % x)++;
    }
  }
  auto patel = pow(mat, b);
  std::cout << patel.at(0, k) << std::endl;
  return EXIT_SUCCESS;
}
