#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long m, n, x, y, z, b, k;
long long cnt[20];
struct matrix {
  long long m[104][104];
  long long row, col;
};
matrix multiply(matrix a, matrix b) {
  matrix r;
  r.row = a.row;
  r.col = b.col;
  for (long long i = 0; i < r.row; i++) {
    for (long long j = 0; j < r.col; j++) {
      long long sum = 0;
      for (long long k = 0; k < a.col; k++) {
        sum += a.m[i][k] * b.m[k][j];
        sum %= mod;
      }
      r.m[i][j] = sum;
    }
  }
  return r;
}
matrix power(matrix mat, long long p) {
  if (p == 1) return mat;
  matrix ret = power(mat, p / 2);
  ret = multiply(ret, ret);
  if (p % 2) ret = multiply(mat, ret);
  return ret;
}
matrix mat;
int main() {
  cin >> n >> b >> k >> x;
  for (long long i = 0; i < n; i++) {
    scanf("%lld", &y);
    cnt[y]++;
  }
  mat.row = mat.col = x;
  for (long long i = 0; i <= x; i++)
    for (long long j = 0; j <= x; j++) mat.m[i][j] = 0;
  for (long long i = 0; i < x; i++) {
    for (long long j = 1; j < 10; j++) {
      long long ase = i;
      long long hobe = i * 10 + j;
      hobe = hobe % x;
      mat.m[hobe][ase] += cnt[j];
    }
  }
  matrix xxx = power(mat, b);
  printf("%lld\n", xxx.m[k][0] % mod);
  return 0;
}
