#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
long long n, m, i, j, k, l, r, s, t, d, u, ii, jj, x, y, z, h[50], hh[N], b,
    dp[50][105];
class matris {
 public:
  long long a[105][105];
  matris() { memset(a, 0, sizeof a); }
  long long* operator[](int x) { return a[x]; }
  matris operator*(matris b) {
    matris h;
    for (int i = 0; i < 105; i++)
      for (int j = 0; j < 105; j++)
        for (int l = 0; l < 105; l++)
          h[i][j] = (h[i][j] + a[i][l] * b[l][j]) % 1000000007;
    return h;
  }
};
matris fe(matris a, long long x) {
  if (x == 1) return a;
  matris b = fe(a, x / 2);
  b = b * b;
  if (x & 1) b = b * a;
  return b;
}
matris a;
int main() {
  cin >> n >> b >> k >> x;
  for (i = 1; i <= n; i++) {
    scanf("%lld", &y);
    h[y]++;
  }
  for (i = 0; i < x; i++)
    for (j = 0; j < 10; j++) {
      a[i][(i * 10 + j) % x] += h[j];
      a[i][(i * 10 + j) % x] %= 1000000007;
    }
  a = fe(a, b);
  printf("%lld\n", a[0][k]);
}
