#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
long long n, b, u, m;
vector<long long> dat;
vector<long long> operator*(vector<long long> x, vector<long long> y) {
  long long i, j;
  vector<long long> res(m);
  for (i = 0; i < m; i++)
    for (j = 0; j < m; j++)
      res[(i + j) % m] += x[i] * y[j], res[(i + j) % m] %= 1000000007;
  return res;
}
vector<long long> operator*(vector<long long> x, long long y) {
  long long i;
  vector<long long> res(m);
  for (i = 0; i < m; i++)
    res[(i * y) % m] += x[i], res[(i * y) % m] %= 1000000007;
  return res;
}
long long gcd(long long x, long long y) { return x == 0 ? y : gcd(y % x, x); }
long long mypow(long long x, long long y) {
  int i;
  long long res = 1;
  for (i = 0; i < 63; i++) {
    if ((1ll << i) & y) res *= x, res %= 1000000007;
    x *= x, x %= 1000000007;
  }
  return res;
}
int main() {
  int i, j, k;
  cin >> n >> b >> u >> m;
  dat.resize(m);
  for (i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    dat[x % m]++;
  }
  long long now = 1;
  vector<long long> ares(m);
  ares[0] = 1;
  for (j = 0; j < min(200ll, b); j++) {
    ares = ares * dat;
    dat = dat * 10;
    now *= 10;
    now %= m;
  }
  b = max(b - 200, 0ll);
  long long past = now;
  long long t;
  vector<long long> res(m), odat;
  res[0] = 1;
  odat = dat;
  for (j = 0; j < 300; j++) {
    res = res * dat;
    dat = dat * 10;
    now *= 10;
    now %= m;
    if (now == past) {
      t = j + 1;
      break;
    }
  }
  vector<long long> tres(m);
  tres[0] = 1;
  now = 1;
  for (j = 0; j < b % t; j++) {
    tres = tres * odat;
    odat = odat * 10;
    now *= 10;
    now %= m;
  }
  vector<long long> ures(m);
  ures[0] = 1;
  for (i = 0; i < 63; i++) {
    if ((1ll << i) & (b / t)) ures = ures * res;
    res = res * res;
  }
  ures = ures * tres;
  ures = ures * ares;
  cout << ures[u];
  return 0;
}
