#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int N = 50000 + 5;
int n, b, k, x;
int a[N];
int q[10];
const int MO = 1000000000 + 7;
const int M = 100 + 5;
int m[M][M];
int r[M][M];
void add(int& a, int b) { a = (a + b) % MO; }
int c[M][M];
void mult(int a[M][M], int b[M][M]) {
  for (int i = 0; i < (int)(k); ++i)
    for (int j = 0; j < (int)(k); ++j) c[i][j] = 0;
  for (int i = 0; i < (int)(k); ++i) {
    for (int j = 0; j < (int)(k); ++j) {
      for (int u = 0; u < (int)(k); ++u) {
        add(c[i][j], ((long long)a[i][u] * b[u][j]) % MO);
      }
    }
  }
  for (int i = 0; i < (int)(k); ++i)
    for (int j = 0; j < (int)(k); ++j) a[i][j] = c[i][j];
}
void solve() {
  scanf("%d%d%d%d", &n, &b, &x, &k);
  for (int i = 1; i <= (int)(n); ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= (int)(n); ++i) ++q[a[i]];
  for (int i = 0; i < (int)(k); ++i) {
    for (int j = 1; j <= (int)(9); ++j) {
      add(m[(i * 10 + j) % k][i], q[j]);
    }
  }
  for (int i = 0; i < (int)(k); ++i)
    for (int j = 0; j < (int)(k); ++j) r[i][j] = 0;
  for (int i = 0; i < (int)(k); ++i) r[i][i] = 1;
  for (; b; b >>= 1) {
    if (b & 1) mult(r, m);
    mult(m, m);
  }
  printf("%d\n", r[x][0]);
}
void testgen() {
  FILE* f = fopen("input.txt", "w");
  fclose(f);
}
int main() {
  std::cout << std::fixed;
  std::cout.precision(8);
  std::cerr << std::fixed;
  std::cerr.precision(3);
  solve();
  return 0;
}
