#include <bits/stdc++.h>
using namespace std;
const long long modn = 1000000007;
inline long long mod(long long x) { return x % modn; }
const int N = 112;
long long M[N][N], ans[N][N], aux[N][N];
int a[12], x;
void mult(long long A[N][N], long long B[N][N], long long C[N][N]) {
  int i, j, k;
  for (i = 0; i < x; i++)
    for (j = 0; j < x; j++) {
      C[i][j] = 0;
      for (k = 0; k < x; k++) C[i][j] = mod(C[i][j] + A[i][k] * B[k][j]);
    }
}
void cp(long long A[N][N], long long B[N][N]) {
  for (int i = 0; i < x; i++)
    for (int j = 0; j < x; j++) B[i][j] = A[i][j];
}
int main() {
  int i, j, n, b, k, v, d, y;
  scanf("%d %d %d %d", &n, &b, &k, &x);
  for (i = 0; i < n; i++) {
    scanf("%d", &y);
    a[y]++;
  }
  for (v = 0; v < x; v++)
    for (v = 0; v < x; v++)
      for (d = 0; d <= 9; d++) M[(10 * v + d) % x][v] += a[d];
  for (i = 0; i < x; i++) ans[i][i] = 1;
  for (; b; b >>= 1) {
    if (b & 1) mult(M, ans, aux), cp(aux, ans);
    mult(M, M, aux);
    cp(aux, M);
  }
  printf("%d\n", ans[k][0]);
}
