#include <bits/stdc++.h>
using namespace std;
class Matrix {
 public:
  int rows, cols;
  long long int mat[102][102];
  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] =
              ((temp.mat[i][j] + ((mat[i][k] * a.mat[k][j]) % 1000000007)) %
               1000000007);
    return temp;
  }
  void pow(long long int 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 int n, b, k, x;
Matrix matrix;
void solve(int test_case) {
  scanf("%lld", &n);
  scanf("%lld", &b);
  scanf("%lld", &k);
  scanf("%lld", &x);
  matrix = Matrix(x - 1, x - 1);
  for (int i = 1; i <= n; i++) {
    long long int a;
    scanf("%lld", &a);
    for (int j = 0; j <= x - 1; j++) {
      long long int first = (j * 10 + a) % x;
      matrix.mat[first][j] = ((matrix.mat[first][j] + 1) % 1000000007);
    }
  }
  matrix.pow(b);
  cout << matrix.mat[k][0] << endl;
}
int main() {
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve(i);
  }
  return 0;
}
