#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110, MOD = 1e9 + 7;
long long a[MAXN][MAXN][33], dp[MAXN], num[20], res[MAXN];
void mul(int x) {
  for (int i = 0; i < 100; i++)
    for (int j = 0; j < 100; j++)
      for (int k = 0; k < 100; k++)
        a[i][j][x] = (a[i][j][x] + 1LL * a[i][k][x - 1] * a[k][j][x - 1]) % MOD;
}
void mul2(int x) {
  memset(res, 0, sizeof res);
  for (int i = 0; i < 100; i++)
    for (int j = 0; j < 100; j++)
      res[i] = (res[i] + 1LL * a[i][j][x] * dp[j]) % MOD;
  for (int i = 0; i < 100; i++) dp[i] = res[i];
}
int main() {
  int n, b, k, x;
  cin >> n >> b >> k >> x;
  for (int i = 0, y; i < n; i++) {
    cin >> y;
    num[y]++;
  }
  for (int i = 0; i < x; i++) {
    for (int j = 1; j < 10; j++) {
      a[(i * 10 + j) % x][i][0] += num[j];
    }
  }
  for (int i = 1; i < 32; i++) mul(i);
  dp[0] = 1;
  for (int i = 31; i > -1; i--) {
    if (b >= (1LL << i)) {
      mul2(i);
      b -= (1LL << i);
    }
  }
  cout << dp[k] << endl;
  return 0;
}
