#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110, mod = 1000000007;
inline int add(int a, int b) { return (a + b) % mod; }
inline int mul(int a, int b) { return ((long long int)a * b) % mod; }
int n;
int num[MAXN];
int glavna[MAXN][MAXN], prijelaz[MAXN][MAXN], pomocna[MAXN][MAXN];
void mnozi(int a[MAXN][MAXN], int b[MAXN][MAXN]) {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      for (int k = 0; k < n; k++)
        pomocna[i][j] = add(pomocna[i][j], mul(a[i][k], b[k][j]));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      a[i][j] = pomocna[i][j];
      pomocna[i][j] = 0;
    }
}
void potenciraj(int x) {
  while (x) {
    if (x & 1) mnozi(glavna, prijelaz);
    mnozi(prijelaz, prijelaz);
    x /= 2;
  }
}
void ispis() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) cout << glavna[i][j] << " ";
    cout << endl;
  }
  cout << "-----------" << endl;
}
int main() {
  int a, b, c;
  scanf("%d %d %d %d", &a, &b, &c, &n);
  for (int i = 0; i < a; i++) {
    int x;
    scanf("%d", &x);
    num[x]++;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      for (int br = 0; br < 10; br++)
        if ((j * 10 + br) % n == i) prijelaz[i][j] += num[br];
  for (int i = 0; i < n; i++) glavna[i][i] = 1;
  potenciraj(b);
  printf("%d\n", glavna[c][0]);
  return 0;
}
