#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
struct mat {
  int a[105][105], w, h;
  mat(int h, int w, int type) : h(h), w(w) {
    memset(a, 0, sizeof(a));
    if (type == 1) {
      for (int i = 0; i < h; ++i) a[i][i] = 1;
    }
  }
};
mat operator*(const mat &a, const mat &b) {
  mat res = mat(a.h, b.w, 0);
  for (int i = 0; i < a.h; ++i) {
    for (int j = 0; j < b.w; ++j) {
      for (int k = 0; k < a.w; ++k) {
        (res.a[i][j] += (1LL * a.a[i][k] * b.a[k][j]) % MOD) %= MOD;
      }
    }
  }
  return res;
}
int cnt[10];
mat mpow(mat x, int n) {
  mat res = mat(x.h, x.w, 1);
  while (n) {
    if (n & 1) res = res * x;
    x = x * x;
    n >>= 1;
  }
  return res;
}
int main() {
  int n, b, k, x;
  scanf("%d%d%d%d", &n, &b, &k, &x);
  for (int i = 0; i < n; ++i) {
    int a;
    scanf("%d", &a);
    cnt[a]++;
  }
  mat p = mat(x, x, 0);
  for (int i = 0; i < x; ++i) {
    for (int j = 1; j <= 9; ++j) {
      (p.a[(i * 10 + j) % x][i] += cnt[j]) %= MOD;
    }
  }
  mat ans = mpow(p, b);
  mat r = mat(x, 1, 0);
  r.a[0][0] = 1;
  ans = ans * r;
  printf("%d\n", ans.a[k][0]);
}
