#include <bits/stdc++.h>
using namespace std;
int freq[10], x;
long long int P = 1000000007;
struct matrix {
  long long int arr[100][100];
};
matrix mul(matrix a, matrix b) {
  matrix c;
  for (int i = 0; i < x; i++)
    for (int j = 0; j < x; j++) {
      c.arr[i][j] = 0;
      for (int k = 0; k < x; k++)
        c.arr[i][j] = (c.arr[i][j] + (a.arr[i][k] * b.arr[k][j]) % P) % P;
    }
  return c;
}
matrix T, I;
matrix mpow(matrix X, int power) {
  if (power == 0) return I;
  if (power == 1) return T;
  matrix tmp;
  if (power & 1)
    tmp = mpow(X, power - 1), tmp = mul(tmp, X);
  else
    tmp = mpow(X, power >> 1), tmp = mul(tmp, tmp);
  return tmp;
}
int main() {
  cin.sync_with_stdio(0);
  int n, b, k, d;
  cin >> n >> b >> k >> x;
  for (int i = 0; i < n; i++) cin >> d, freq[d]++;
  for (int i = 0; i < x; i++) {
    I.arr[i][i] = 1;
    for (int j = 1; j <= 9; j++)
      T.arr[i][(i * 10 + j) % x] = (T.arr[i][(i * 10 + j) % x] + freq[j]) % P;
  }
  T = mpow(T, b);
  cout << T.arr[0][k] << "\n";
  return 0;
}
