#include <bits/stdc++.h>
int n, b, k, x, a, c[105][40], f[10];
int pow(int x, int y, int z) {
  if (y == 0) return 1;
  if (y % 2) return (long long)pow(x, y - 1, z) * x % z;
  int t = pow(x, y / 2, z);
  return (long long)t * t % z;
}
int solve(int b, int k, int d) {
  int y = 0;
  if (b == 1) {
    for (int i = 0; i < 10; i++)
      if (i % x == k) y += f[i];
  } else if (b % 2) {
    for (int i = 0; i < x; i++) {
      int z = k - 10 * i;
      while (z < 0) z += x;
      y = ((long long)solve(1, z, -1) * solve(b - 1, i, d) + y) % 1000000007;
    }
  } else {
    if (c[k][d] != -1) return c[k][d];
    int t[x];
    for (int i = 0; i < x; i++) t[i] = solve(b / 2, i, d + 1);
    for (int i = 0; i < x; i++) {
      int z = k - pow(10, b / 2, x) * i;
      while (z < 0) z += x;
      y = ((long long)t[z] * t[i] + y) % 1000000007;
    }
    c[k][d] = y;
  }
  return y;
}
int main() {
  scanf("%d %d %d %d", &n, &b, &k, &x);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    f[a]++;
  }
  for (int i = 0; i < 105; i++)
    for (int j = 0; j < 40; j++) c[i][j] = -1;
  printf("%d\n", solve(b, k, 0));
  scanf("\n");
  return 0;
}
