#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7LL;
struct M {
  long long a[111][111];
  int n, m;
  M(int nn, int mm) {
    n = nn;
    m = mm;
    memset(a, 0, sizeof a);
  }
};
M operator*(M &A, M &B) {
  M J(A.n, B.m);
  for (int i = 0; i < A.n; i++)
    for (int j = 0; j < B.m; j++)
      for (int k = 0; k < A.m; k++) {
        J.a[i][j] += (A.a[i][k] * B.a[k][j]) % MOD;
        J.a[i][j] %= MOD;
      }
  return J;
}
const int N = 50500;
int n, bb, k, x;
int cnt[N];
M power(M a, int n) {
  if (n == 1) {
    return a;
  }
  if (n % 2 == 0) {
    M b = power(a, n / 2);
    b = b * b;
    return b;
  } else {
    M b = power(a, n - 1);
    b = a * b;
    return b;
  }
}
int main() {
  scanf("%d%d%d%d", &n, &bb, &k, &x);
  for (int i = 1; i <= n; i++) {
    int val;
    scanf("%d", &val);
    cnt[val]++;
  }
  M a(1, 101);
  M b(101, 101);
  a.a[0][0] = 1LL;
  for (int i = 0; i < x; i++) {
    for (int j = 0; j <= 9; j++) {
      int pi = (i * 10) + j;
      pi = pi % x;
      b.a[i][pi] += 1LL * cnt[j];
    }
  }
  b = power(b, bb);
  a = a * b;
  cout << a.a[0][k] << endl;
  return 0;
}
