#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const int X = 105;
vector<vector<long long>> dp;
long long cnt[X];
vector<vector<long long>> mult(vector<vector<long long>> a,
                               vector<vector<long long>> b) {
  vector<vector<long long>> res(X);
  for (int i = 0; i < X; ++i) res[i].resize(X, 0);
  for (int i = 0; i < X; ++i) {
    for (int j = 0; j < X; ++j) {
      for (int k = 0; k < X; ++k) {
        res[i][j] = (res[i][j] + a[i][k] * b[k][j]) % MOD;
      }
    }
  }
  return res;
}
vector<vector<long long>> ans;
void binpow(int pw) {
  if (pw == 1) {
    for (int i = 0; i < X; ++i) {
      for (int j = 0; j < X; ++j) {
        ans[i][j] = dp[i][j];
      }
    }
    return;
  }
  binpow(pw / 2);
  ans = mult(ans, ans);
  if (pw % 2) ans = mult(ans, dp);
}
int main() {
  int n, b, k, x;
  cin >> n >> b >> k >> x;
  for (int i = 0; i < n; ++i) {
    int dig;
    cin >> dig;
    ++cnt[dig % x];
  }
  ans.resize(X);
  dp.resize(X);
  for (int i = 0; i < X; ++i) {
    ans[i].resize(X, 0);
    dp[i].resize(X, 0);
  }
  for (int i = 0; i < x; ++i) {
    for (int j = 0; j < x; ++j) {
      long long nd = (i - (10ll * j) % x + x) % x;
      dp[i][j] = cnt[nd] % MOD;
    }
  }
  binpow(b);
  cout << ans[k][0];
  return 0;
}
