#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 50000;
const int MAX_MOD = 100;
const int MOD = 1000000007;
int n, b, k, x;
int F[10];
class Matrix {
 public:
  int h, w;
  int M[MAX_MOD][MAX_MOD];
  Matrix(int newH, int newW) {
    memset(M, 0, sizeof(M[0][0]) * MAX_MOD * MAX_MOD);
    h = newH;
    w = newW;
  }
  Matrix operator*(const Matrix &other) const {
    int i, j, t;
    Matrix RET(this->h, other.w);
    for (i = 0; i <= RET.h; i++) {
      for (j = 0; j <= RET.w; j++) {
        for (t = 0; t <= this->w; t++) {
          RET.M[i][j] =
              (1LL * RET.M[i][j] + 1LL * this->M[i][t] * other.M[t][j]) % MOD;
        }
      }
    }
    return RET;
  }
  void print() {
    int i, j;
    for (i = 0; i <= h; i++) {
      for (j = 0; j <= w; j++) {
        printf("%d ", M[i][j]);
      }
      printf("\n");
    }
    printf("\n\n");
  }
};
Matrix expMatrix(const Matrix &B, int exp) {
  if (exp == 1) {
    return B;
  }
  Matrix HALF = expMatrix(B, exp / 2);
  if (exp & 1) return HALF * HALF * B;
  return HALF * HALF;
}
int main() {
  int i, j, r1, r2, val;
  scanf("%d %d %d %d", &n, &b, &k, &x);
  for (i = 1; i <= n; i++) {
    scanf("%d", &val);
    F[val]++;
  }
  Matrix valMat(1, x - 1);
  Matrix recMat(x - 1, x - 1);
  for (r1 = 0; r1 < x; r1++) {
    for (i = 0; i < 10; i++) {
      r2 = (r1 * 10 + i) % x;
      recMat.M[r1][r2] += F[i];
    }
  }
  for (i = 0; i < 10; i++) {
    valMat.M[1][i % x] += F[i];
  }
  if (b > 1) {
    valMat = valMat * expMatrix(recMat, b - 1);
  }
  printf("%d\n", valMat.M[1][k]);
  return 0;
}
