#include <bits/stdc++.h>
using namespace std;
template <typename T>
void debug0(const T &value) {
  cerr << value << endl;
}
template <typename T, typename... Args>
void debug0(const T &value, const Args &...args) {
  cerr << value << ' ';
  debug0(args...);
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int N, B, K, X;
  cin >> N >> B >> K >> X;
  auto ans1 = vector<int>(X, 0);
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    ans1[x % X]++;
  }
  const int MODULO = 1e9 + 7;
  auto add = [](int a, int b, int modulo) {
    a += b;
    while (a >= modulo) {
      a -= modulo;
    }
    return a;
  };
  auto adds = [&](int &a, int b) { a = add(a, b, MODULO); };
  auto mul = [](int a, int b, int modulo) {
    return static_cast<int>(static_cast<long long>(a) * b % modulo);
  };
  auto merge = [&](const vector<int> &a, const vector<int> &b) {
    auto ret = vector<int>(X, 0);
    for (int rem1 = 0; rem1 < X; rem1++) {
      for (int rem2 = 0; rem2 < X; rem2++) {
        adds(ret[add(rem1, rem2, X)], mul(a[rem1], b[rem2], MODULO));
      }
    }
    return ret;
  };
  function<int(int, int, int)> pow = [&](int base, int exp, int modulo) {
    if (exp == 0) {
      return 1;
    }
    if (exp % 2 == 1) {
      return mul(base, pow(base, exp - 1, modulo), modulo);
    }
    int half = pow(base, exp / 2, modulo);
    return mul(half, half, modulo);
  };
  auto cnt_mul = [&](int a, const vector<int> &b) {
    auto ret = vector<int>(X, 0);
    for (int rem = 0; rem < X; rem++) {
      adds(ret[mul(a, rem, X)], b[rem]);
    }
    return ret;
  };
  function<vector<int>(int)> solve = [&](int b) {
    if (b == 1) {
      return ans1;
    }
    if (b % 2 == 1) {
      return merge(ans1, cnt_mul(10, solve(b - 1)));
    }
    auto half_ans1 = solve(b / 2);
    auto p10 = pow(10, b / 2, X);
    auto half_ans2 = cnt_mul(p10, half_ans1);
    return merge(half_ans1, half_ans2);
  };
  cout << solve(B)[K] << '\n';
}
