#include <bits/stdc++.h>
using namespace std;
int n, b, k, x;
int occ[11];
struct matrix {
  long long mat[111][111];
  int rows, cols;
  matrix(int a, int b) {
    memset(mat, 0, sizeof(mat));
    rows = a;
    cols = b;
  }
};
matrix identity(int n) {
  matrix A(n, n);
  memset(A.mat, 0, sizeof(A.mat));
  for (int i = 0; i < n; i++) A.mat[i][i] = 1;
  return A;
}
matrix mul(matrix A, matrix B) {
  int a = A.rows;
  int b = B.cols;
  matrix C(a, b);
  for (int i = 0; i < a; i++) {
    for (int j = 0; j < b; j++) {
      for (int k = 0; k < A.cols; k++)
        C.mat[i][j] = (C.mat[i][j] + 1LL * A.mat[i][k] * B.mat[k][j]) %
                      (1000 * 1000 * 1000 + 7);
    }
  }
  return C;
}
matrix fastpow(matrix m, long long x) {
  matrix ret = identity(m.rows);
  while (x) {
    if (x & 1) ret = mul(ret, m);
    m = mul(m, m);
    x >>= 1;
  }
  return ret;
}
matrix precalc() {
  matrix A(x, x);
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < 10; j++) {
      int y = (10 * i + j) % x;
      A.mat[i][y] += occ[j];
    }
  }
  return A;
}
int main() {
  scanf("%d%d%d%d", &n, &b, &k, &x);
  for (int i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    occ[a % x]++;
  }
  matrix A = precalc();
  matrix B(1, x);
  for (int i = 0; i < x; i++) B.mat[0][i] = 0;
  B.mat[0][0] = 1;
  matrix ANS = mul(B, fastpow(A, b));
  printf("%lld\n", ANS.mat[0][k]);
  return 0;
}
