#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e2 + 1, mod = 1e9 + 7, LOG = 30;
int n, b, k, ted[maxn], x;
struct matrix {
  int mat[maxn][maxn];
  int n;
  int m;
  matrix(int a, int b) {
    n = a;
    m = b;
    for (int i = 0; i < maxn; i++) {
      for (int j = 0; j < maxn; j++) {
        mat[i][j] = 0;
      }
    }
  }
  int* operator[](int x) { return mat[x]; }
};
matrix operator*(matrix a, matrix b) {
  matrix res(a.n, b.m);
  for (int i = 0; i < res.n; i++) {
    for (int k = 0; k < a.m; k++) {
      for (int j = 0; j < res.m; j++) {
        res[i][j] = (res[i][j] + (1ll * a[i][k] * b[k][j])) % mod;
      }
    }
  }
  return res;
}
matrix Identity(int x) {
  matrix res(x, x);
  for (int i = 0; i < x; i++) {
    res[i][i] = 1;
  }
  return res;
}
matrix operator^(matrix a, int b) {
  matrix res = Identity(a.n);
  matrix tmp = a;
  for (int i = 0; i <= LOG; i++) {
    if ((1 << i) & b) {
      res = res * tmp;
    }
    if ((1 << i) >= b) {
      break;
    }
    tmp = tmp * tmp;
  }
  return res;
}
int main() {
  cin >> n >> b >> k >> x;
  for (int i = 1; i <= n; i++) {
    int t1;
    cin >> t1;
    ted[t1]++;
  }
  matrix ans(1, x);
  ans[0][0] = 1;
  matrix p(x, x);
  for (int i = 1; i <= 9; i++) {
    for (int j = 0; j < x; j++) {
      int c = (j * 10 + i) % x;
      p[j][c] = (p[j][c] + ted[i]) % mod;
    }
  }
  p = p ^ b;
  ans = ans * p;
  cout << ans[0][k] << endl;
}
