#include <bits/stdc++.h>
using namespace std;
class Matrix {
 public:
  int rows, cols;
  long long mat[103][103];
  long long add(long long a, long long b) { return (a + b) % 1000000007; }
  long long sub(long long a, long long b) {
    long long val = a - b;
    while (val < 0) val += 1000000007;
    return val;
  }
  long long mul(long long a, long long b) {
    long long val = a * b;
    if (val >= 1000000007) val %= 1000000007;
    return val;
  }
  Matrix() {}
  Matrix(int n, int m) {
    rows = n, cols = m;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) mat[i][j] = 0;
  }
  void get_identity() {
    for (int i = 0; i < rows; i++) {
      for (int j = 0; j < cols; j++) {
        if (i == j) {
          mat[i][j] = 1;
        } else {
          mat[i][j] = 0;
        }
      }
    }
  }
  Matrix operator*(const Matrix& a) {
    Matrix temp(rows, cols);
    for (int i = 0; i < rows; i++)
      for (int j = 0; j < a.cols; j++)
        for (int k = 0; k < cols; k++)
          temp.mat[i][j] = add(temp.mat[i][j], mul(mat[i][k], a.mat[k][j]));
    return temp;
  }
  vector<long long> operator*(vector<long long> a) {
    int N = a.size();
    vector<long long> ans(N);
    for (int i = 0; i < N; i++)
      for (int j = 0; j < N; j++) ans[i] = add(ans[i], mul(mat[i][j], a[j]));
    return ans;
  }
  void pow(long long p) {
    Matrix res(rows, cols);
    res.get_identity();
    while (p) {
      if (p & 1) res = res * (*this);
      *this = (*this) * (*this);
      p /= 2;
    }
    *this = res;
  }
};
long long n, b, k, x, p;
Matrix Mat;
long long cnt[13];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> b >> k >> x;
  Mat = Matrix(x, x);
  for (int i = 1; i < n + 1; i++) {
    cin >> p;
    cnt[p]++;
  }
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < 10; j++) {
      p = (i * 10 + j) % x;
      Mat.mat[p][i] += cnt[j];
    }
  }
  Mat.pow(b);
  vector<long long> r(x);
  r[0] = 1;
  r = Mat * r;
  cout << r[k] << endl;
  return 0;
}
