#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int X = 105;
std::vector<int> base;
int x;
int add(int a, int b, int MOD) {
  int ret = a + b;
  if (ret >= MOD) {
    return ret - MOD;
  }
  return ret;
}
int mult(int a, int b, int MOD) {
  long long ret = a;
  ret *= b;
  if (ret >= MOD) {
    return ret % MOD;
  }
  return ret;
}
int pwr(int a, int b, int MOD) {
  int ret = 1;
  while (b) {
    if (b & 1) {
      ret = mult(ret, a, MOD);
    }
    a = mult(a, a, MOD);
    b >>= 1;
  }
  return ret;
}
vector<int> solve(int b) {
  if (b == 1) return base;
  vector<int> half = solve(b / 2);
  std::vector<int> ret;
  ret.resize(X, 0);
  int pw = pwr(10, b / 2, x);
  for (int i = 0; i < x; ++i)
    for (int j = 0; j < x; ++j)
      ret[add(mult(i, pw, x), j, x)] =
          add(ret[add(mult(i, pw, x), j, x)], mult(half[i], half[j], MOD), MOD);
  if (b & 1) {
    vector<int> ret2;
    ret2.resize(X, 0);
    for (int i = 0; i < x; ++i) {
      for (int j = 0; j < x; ++j) {
        ret2[add(mult(i, 10, x), j, x)] = add(ret2[add(mult(i, 10, x), j, x)],
                                              mult(ret[i], base[j], MOD), MOD);
      }
    }
    return ret2;
  }
  return ret;
}
int main() {
  int n, b, k;
  scanf("%d %d %d %d", &n, &b, &k, &x);
  base.resize(X, 0);
  int tmp;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &tmp);
    ++base[tmp % x];
  }
  cout << solve(b)[k] << "\n";
  return 0;
}
