#include <bits/stdc++.h>
using namespace std;
const int nMax = 105;
struct Matrix {
  long long mat[nMax][nMax], MOD;
  int n;
  Matrix(int n = 1, long long MOD = 1000000007) : n(n), MOD(MOD) {
    memset(mat, 0, sizeof(mat));
    for (int i = 1; i <= n; i++) mat[i][i] = 1;
  }
  friend Matrix operator*(const Matrix &a, const Matrix &b) {
    Matrix c(a.n, a.MOD);
    memset(c.mat, 0, sizeof(c.mat));
    for (int i = 1; i <= a.n; i++)
      for (int j = 1; j <= a.n; j++)
        if (a.mat[i][j])
          for (int k = 1; k <= a.n; k++) {
            c.mat[i][k] += a.mat[i][j] * b.mat[j][k];
            c.mat[i][k] %= a.MOD;
          }
    return c;
  }
  friend Matrix Exp(Matrix a, long long t) {
    Matrix c(a.n, a.MOD);
    Matrix b = a;
    while (t) {
      if (t & 1) c = c * b;
      t >>= 1;
      b = b * b;
    }
    return c;
  }
  void init() { memset(mat, 0, sizeof(mat)); }
};
int n, k, b, x;
int num[10];
int main() {
  scanf("%d%d%d%d", &n, &b, &k, &x);
  int t;
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    num[t]++;
  }
  Matrix a(x);
  a.init();
  for (int j = 1; j <= x; j++)
    for (int t = 1; t <= 9; t++) {
      int z = (10 * (j - 1) + t) % x + 1;
      a.mat[j][z] += num[t];
    }
  int ans = Exp(a, b).mat[1][k + 1];
  printf("%d\n", ans);
  return 0;
}
