#include <bits/stdc++.h>
using namespace std;
const int N = 5e4 + 5;
const int M = 105;
const int MOD = 1e9 + 7;
int cnt[N];
int n, b, k, x;
struct Matrix {
  long long ar[M][M];
  Matrix() { memset(ar, 0, sizeof ar); }
  void init() {
    for (int i = 0; i < x; ++i) {
      for (int j = 0; j <= 9; ++j) {
        ar[i][(10 * i + j) % x] += cnt[j];
      }
    }
  }
};
Matrix base;
Matrix mulmat(Matrix a, Matrix b) {
  Matrix res;
  for (int i = 0; i < x; ++i) {
    for (int j = 0; j < x; ++j) {
      for (int k = 0; k < x; ++k) {
        res.ar[i][j] += a.ar[i][k] * b.ar[k][j];
        res.ar[i][j] %= MOD;
      }
    }
  }
  return res;
}
Matrix mat_pow(Matrix a, int b) {
  if (b == 1) return a;
  Matrix tmp = mat_pow(a, b / 2);
  tmp = mulmat(tmp, tmp);
  if (b % 2 == 0) return tmp;
  return mulmat(tmp, a);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> b >> k >> x;
  for (int i = 1; i <= n; ++i) {
    int tmp;
    cin >> tmp;
    ++cnt[tmp];
  }
  base.init();
  Matrix res = mat_pow(base, b);
  cout << res.ar[0][k] << endl;
  return 0;
}
