#include <bits/stdc++.h>
using namespace std;
constexpr int N = 100 + 10;
constexpr int MOD = 1e9 + 7;
long long n, b, k, x, cnt[N], dig;
struct Mat {
  long long mat[N][N], n, m;
  Mat(int _n, int _m, bool f) {
    n = _n;
    m = _m;
    for (int i = 0; i < _n; i++)
      for (int j = 0; j < _m; j++) mat[i][j] = (i == j && f);
  }
  long long* operator[](int p) { return mat[p]; }
  Mat operator*(Mat x) {
    Mat res(n, x.m, 0);
    for (int i = 0; i < n; i++)
      for (int j = 0; j < x.m; j++)
        for (int k = 0; k < m; k++)
          res[i][j] = (res[i][j] + mat[i][k] * x[k][j]) % MOD;
    return res;
  }
  Mat operator^(long long num) {
    Mat res(n, m, 1);
    Mat now = *this;
    while (num) {
      if (num & 1) res = res * now;
      now = now * now;
      num >>= 1;
    }
    return res;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> b >> k >> x;
  for (int i = 0; i < n; i++) cin >> dig, cnt[dig]++;
  Mat base = Mat(1, x, 0);
  Mat base2 = Mat(x, x, 0);
  base[0][0] = 1;
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < 10; j++) {
      int r = (10 * i + j) % x;
      base2[i][r] += cnt[j];
    }
  }
  base = base * (base2 ^ b);
  cout << base[0][k] << '\n';
  return 0;
}
