#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
struct Matrix {
  int size;
  int mat[100][100];
  Matrix(int sz) {
    size = sz;
    for (int i = 0, __ = sz; i < __; ++i)
      for (int j = 0, __ = sz; j < __; ++j) mat[i][j] = 0;
  }
  Matrix operator*(const Matrix other) const {
    Matrix ret = Matrix(size);
    for (int i = 0, __ = size; i < __; ++i)
      for (int j = 0, __ = size; j < __; ++j) {
        ret.mat[i][j] = 0;
        for (int k = 0, __ = size; k < __; ++k)
          ret.mat[i][j] =
              (ret.mat[i][j] + (long long)mat[i][k] * other.mat[k][j]) % MOD;
      }
    return ret;
  }
};
int main(int argc, char **argv) {
  int n, b, k, x, v;
  scanf("%d %d %d %d", &n, &b, &k, &x);
  Matrix m = Matrix(x);
  for (int i = 0, __ = n; i < __; ++i) {
    scanf("%d", &v);
    for (int j = 0, __ = x; j < __; ++j) m.mat[j][(10 * j + v) % x]++;
  }
  Matrix id = Matrix(x);
  for (int i = 0, __ = x; i < __; ++i) id.mat[i][i] = 1;
  while (b) {
    if (b & 1) id = id * m;
    m = m * m;
    b >>= 1;
  }
  printf("%d\n", id.mat[0][k]);
  return 0;
}
