#include <bits/stdc++.h>
using namespace std;
const double eps = 0.000000000000001;
string convertstring(long long n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
int a[50005], hsh[15], x;
long long mat[105][105], temp[105][105];
const long long MOD2 = ((long long)1000000007 * 1000000007);
long long moo[105][105];
void multiply(long long m1[105][105], long long m2[105][105]) {
  memset(moo, 0, sizeof(moo));
  ;
  int i, j, k;
  for (i = 0; i < x; ++i) {
    for (j = 0; j < x; ++j) {
      for (k = 0; k < x; ++k) {
        moo[i][j] += (m1[i][k] * m2[k][j]);
        if (moo[i][j] >= MOD2) moo[i][j] -= MOD2;
      }
    }
  }
  for (i = 0; i < x; ++i) {
    for (j = 0; j < x; ++j) m1[i][j] = moo[i][j] % 1000000007;
  }
}
void power(long long mat[105][105], int expo) {
  if (expo == 1) return;
  power(mat, expo / 2);
  multiply(mat, mat);
  if (expo & 1) multiply(mat, temp);
}
int main() {
  int n, b, k, i, j;
  scanf("%d%d", &n, &b);
  ;
  scanf("%d%d", &k, &x);
  ;
  for (i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    ;
    hsh[a[i]]++;
  }
  for (i = 0; i < x; ++i) {
    for (int p = 0; p < x; ++p) {
      for (j = 1; j <= 9; ++j) {
        if (((p * 10 + j) % x) == i) {
          mat[i][p] += hsh[j];
          temp[i][p] += hsh[j];
        }
      }
    }
  }
  power(mat, b);
  printf("%lld\n", mat[k][0]);
  return 0;
}
