#include <bits/stdc++.h>
using namespace std;
long long i, j, k, n, m, x, y, T, ans, mx, mi, cas, num, len;
bool flag;
long long a[105];
const int mod = 1000000007;
typedef struct matrixnod {
  long long m[105][105];
} matrix;
matrix mat(matrix a, matrix b) {
  matrix c;
  for (long long i = 0; i < x; i++) {
    for (long long j = 0; j < x; j++) {
      c.m[i][j] = 0;
      for (long long k = 0; k < x; k++) {
        c.m[i][j] += a.m[i][k] * b.m[k][j];
        c.m[i][j] %= mod;
      }
    }
  }
  return c;
}
matrix p, f;
matrix doexpmat(matrix f, long long num) {
  matrix b;
  long long i, j;
  for (i = 0; i < x; i++) {
    for (j = 0; j < x; j++) {
      if (i == j)
        b.m[i][j] = 1;
      else
        b.m[i][j] = 0;
    }
  }
  while (num) {
    if (num & 1) b = mat(b, f);
    num = num >> 1;
    f = mat(f, f);
  }
  return b;
}
long long b, t;
int main() {
  scanf("%I64d%I64d%I64d%I64d", &n, &b, &k, &x);
  for (i = 1; i <= n; i++) {
    scanf("%I64d", &t);
    a[t]++;
  }
  for (i = 0; i < x; i++) {
    for (j = 0; j < 10; j++) {
      f.m[i][(i * 10 + j) % x] += a[j];
      f.m[i][(i * 10 + j) % x] %= mod;
    }
  }
  matrix pp = doexpmat(f, b);
  printf("%I64d\n", pp.m[0][k]);
  return 0;
}
