#include <bits/stdc++.h>
void quit();
using namespace std;
const long double PI = acos(-1);
const long double EPS = 1e-10;
double __t;
int d[100500];
int n;
int k, first;
long long a[128][128];
long long tmp[128][128];
long long res[128][128];
int b;
const int mod = 1000000007;
inline void mult(long long f[][128], long long s[][128]) {
  for (int i = 0; i < first; ++i) {
    for (int j = 0; j < first; ++j) {
      tmp[i][j] = 0;
      for (int k = 0; k < first; ++k) {
        tmp[i][j] += (f[i][k] * s[k][j]) % mod;
        tmp[i][j] %= mod;
      }
    }
  }
}
inline void ret(long long f[][128]) {
  for (int i = 0; i < first; ++i)
    for (int j = 0; j < first; ++j) f[i][j] = tmp[i][j];
}
inline void powMod(int e) {
  for (int i = 0; i < first; ++i) res[i][i] = 1;
  for (; e; e >>= 1) {
    if (e & 1) {
      mult(res, a);
      ret(res);
    }
    mult(a, a);
    ret(a);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> b >> k >> first;
  for (int i = 0; i < n; ++i) cin >> d[i];
  for (int i = 0; i < first; ++i)
    for (int j = 0; j < n; ++j) a[i][(10 * i + d[j]) % first]++;
  powMod(b);
  cout << res[0][k];
  quit();
}
void quit() { exit(0); }
