#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000 * 1000 * 1000 + 7;
struct matrix {
  int n, m;
  long long a[107][107];
  matrix() {
    for (int i = 0; i < 107; i++) {
      for (int j = 0; j < 107; j++) {
        a[i][j] = 0;
      }
    }
  }
};
matrix operator*(matrix a, matrix b) {
  assert(a.m == b.n);
  matrix ans;
  ans.n = a.n;
  ans.m = a.m;
  for (int i = 1; i <= ans.n; i++) {
    for (int j = 1; j <= ans.m; j++) {
      for (int k = 1; k <= a.m; k++) {
        ans.a[i][j] += a.a[i][k] * b.a[k][j];
        ans.a[i][j] %= MOD;
      }
    }
  }
  return ans;
}
matrix matPow(matrix x, int k) {
  vector<int> digs;
  while (k > 0) {
    digs.push_back(k % 2);
    k /= 2;
  }
  reverse(digs.begin(), digs.end());
  matrix ans = x;
  for (int i = 1; i < (int)digs.size(); i++) {
    ans = ans * ans;
    if (digs[i]) {
      ans = ans * x;
    }
  }
  return ans;
}
int cnt[10];
int main() {
  int n, b, k, x;
  scanf("%d%d%d%d", &n, &b, &k, &x);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    cnt[x]++;
  }
  matrix go;
  go.n = x;
  go.m = x;
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < 10; j++) {
      int togo = (10 * i + j) % x;
      go.a[i + 1][togo + 1] += cnt[j];
      go.a[i + 1][togo + 1] %= MOD;
    }
  }
  matrix base;
  base = matPow(go, b);
  long long ans = base.a[1][k + 1];
  printf("%lld\n", ans % MOD);
}
