#include <bits/stdc++.h>
using namespace std;
const long long INF = 1 << 28;
const long long LINF = 1ll << 61;
inline long long getnum() {
  register long long r = 0;
  register bool ng = 0;
  register char c;
  c = getchar();
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') ng = 1, c = getchar();
  while (c != ' ' && c != '\n') r = r * 10 + c - '0', c = getchar();
  if (ng) r = -r;
  return r;
}
template <class T>
inline void putnum(T x) {
  if (x < 0) putchar('-'), x = -x;
  register short a[20] = {}, sz = 0;
  while (x > 0) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
inline void putsp() { putchar(' '); }
inline void putendl() { putchar('\n'); }
inline char mygetchar() {
  register char c = getchar();
  while (c == ' ' || c == '\n') c = getchar();
  return c;
}
const int mod = 1e9 + 7;
int n, b, K, m;
struct matrix {
  int a[100][100];
  matrix() { memset(a, 0, sizeof(a)); }
  void set1() {
    for (int i = 0; i < 100; i++) a[i][i] = 1;
  }
  matrix operator*(const matrix tmp) {
    matrix res;
    for (int i = 0; i < 100; i++) {
      for (int j = 0; j < 100; j++) {
        for (int k = 0; k < 100; k++) {
          res.a[i][j] = (res.a[i][j] + 1ll * a[i][k] * tmp.a[k][j] % mod) % mod;
        }
      }
    }
    return res;
  }
} a;
matrix kissme(matrix x, long long k) {
  matrix res;
  res.set1();
  while (k > 0) {
    if (k & 1) res = res * x;
    x = x * x;
    k >>= 1;
  }
  return res;
}
int cnt[11];
int main() {
  n = getnum(), b = getnum();
  K = getnum(), m = getnum();
  for (int i = 1; i <= n; i++) {
    int x;
    x = getnum();
    cnt[x]++;
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < 10; j++) {
      a.a[i][(i * 10 + j) % m] += cnt[j];
    }
  }
  a = kissme(a, b);
  cout << a.a[0][K] << endl;
  return 0;
}
