#include <bits/stdc++.h>
using namespace std;
const int N = 110;
const int mo = 1000000007;
long long n, b, k, xx;
long long temp[N], tt[N][N], ans[N], a[N][N], num[N], t, bb, digb[N], tot;
void init() {
  freopen("temp.in", "r", stdin);
  freopen("temp.out", "w", stdout);
}
void chengax() {
  memset(temp, 0, sizeof(temp));
  for (int i = 0; i < xx; i++) {
    for (int j = 0; j < xx; j++) {
      temp[j] = (temp[j] + ans[i] * a[j][i]) % mo;
    }
  }
  for (int i = 0; i < xx; i++) ans[i] = temp[i];
}
void chengxx() {
  memset(tt, 0, sizeof(tt));
  for (int i = 0; i < xx; i++)
    for (int j = 0; j < xx; j++)
      for (int k = 0; k < xx; k++) {
        tt[i][j] = (tt[i][j] + a[i][k] * a[k][j]) % mo;
      }
  for (int i = 0; i < xx; i++)
    for (int j = 0; j < xx; j++) a[i][j] = tt[i][j];
}
int main() {
  scanf("%I64d%I64d%I64d%I64d", &n, &b, &k, &xx);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &t);
    num[t]++;
  }
  for (int i = 0; i < xx; i++)
    for (int j = 1; j <= 9; j++) {
      a[(i * 10 + j) % xx][i] += num[j];
    }
  bb = b;
  while (bb != 0) {
    digb[tot++] = bb % 2;
    bb /= 2;
  }
  tot--;
  ans[0] = 1;
  if (digb[0] == 1) chengax();
  for (int i = 1; i <= tot; i++) {
    chengxx();
    if (digb[i] == 1) chengax();
  }
  printf("%I64d", ans[k]);
}
