#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000 * 1000 * 1000 + 7;
int n, b, x, k;
int ans[100][100];
int table[100][100];
int tmp[100][100];
int cnt[10];
void input() {
  memset(cnt, 0, sizeof cnt);
  scanf("%d %d %d %d", &n, &b, &k, &x);
  for (int i = 0; i < n; i++) {
    int digit;
    scanf("%d", &digit);
    ++cnt[digit];
  }
}
void mul(int ans[100][100], int ma2[100][100]) {
  memset(tmp, 0, sizeof tmp);
  for (int i = 0; i < x; i++)
    for (int j = 0; j < x; j++) {
      tmp[i][j] = 0;
      for (int k = 0; k < x; k++) {
        tmp[i][j] = (tmp[i][j] + 1ll * ans[i][k] * ma2[k][j]) % MOD;
      }
    }
  for (int i = 0; i < x; i++)
    for (int j = 0; j < x; j++) ans[i][j] = tmp[i][j];
}
void debug(int t[100][100]) {
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < x; j++) cout << t[i][j] << " ";
    cout << endl;
  }
  cout << endl << endl;
}
int main() {
  input();
  for (int i = 0; i < x; i++)
    for (int j = 1; j < 10; j++) {
      table[i][(10 * i + j) % x] += cnt[j];
    }
  for (int i = 0; i < x; i++)
    for (int j = 0; j < x; j++) ans[i][j] = (i == j);
  while (b) {
    if (b & 1) mul(ans, table);
    mul(table, table);
    b = b / 2;
  }
  cout << ans[0][k] << endl;
}
