#include <bits/stdc++.h>
using namespace std;
long long T, B, K, X;
long long cub[105];
const long long MOD = 1e9 + 7;
const long long MAT = 105;
struct Mat {
  long long v[MAT][MAT];
  Mat() { memset(v, 0, sizeof v); };
  Mat(int x) {
    for (int i = 0; i < MAT; i++)
      for (int j = 0; j < MAT; j++) v[i][j] = x;
  };
};
Mat mulmat(Mat& a, Mat& b, long long N) {
  Mat r;
  for (long long i = 1; i <= N; i++)
    for (long long j = 1; j <= N; j++)
      for (long long k = 1; k <= N; k++) {
        r.v[i][j] += a.v[i][k] * b.v[k][j];
        r.v[i][j] %= MOD;
      }
  return r;
}
Mat powmat(Mat a, long long k, long long N) {
  Mat r;
  for (long long i = 1; i <= N; i++) r.v[i][i] = 1;
  while (k) {
    if (k & 1) r = mulmat(r, a, N);
    a = mulmat(a, a, N);
    k >>= 1;
  }
  return r;
}
Mat printmat(Mat& a, long long N) {
  for (long long i = 1; i <= N; i++)
    for (long long j = 1; j <= N; j++) cout << a.v[i][j] << " \n"[j == N];
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> T >> B >> K >> X;
  while (T--) {
    int x;
    cin >> x;
    cub[x % X]++;
  }
  Mat ini;
  for (int i = 1; i <= X; i++) {
    for (int j = 1; j <= X; j++) {
      int tmp = (10 * (j - 1)) % X;
      tmp = (i - 1 - tmp + X) % X;
      ini.v[i][j] = cub[tmp];
    }
  }
  Mat ans = powmat(ini, B, X);
  cout << ans.v[K + 1][1];
  return 0;
}
