#include <bits/stdc++.h>
using namespace std;
int n, b, k, x;
const int mod = 1000000007;
int ans[110][110];
int mat[110][110];
int temp[110][110];
int cnt[10];
void mult(int c[110][110], int a[110][110], int b[110][110]) {
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < x; j++) {
      c[i][j] = 0;
      for (int k = 0; k < x; k++) {
        c[i][j] = (c[i][j] + a[i][k] * 1ll * b[k][j]) % mod;
      }
    }
  }
}
int main() {
  scanf("%d %d %d %d", &n, &b, &k, &x);
  for (int i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    cnt[a]++;
  }
  for (int i = 1; i <= 9; i++) {
    for (int p = 0; p < x; p++) {
      mat[(p * 10 + i) % x][p] += cnt[i];
    }
  }
  for (int i = 0; i < x; i++) ans[i][i] = 1;
  while (b) {
    if (b & 1) {
      mult(temp, ans, mat);
      for (int(i) = 0; (i) < (int)(x); (i)++)
        for (int(j) = 0; (j) < (int)(x); (j)++) ans[i][j] = temp[i][j];
    }
    mult(temp, mat, mat);
    for (int(i) = 0; (i) < (int)(x); (i)++)
      for (int(j) = 0; (j) < (int)(x); (j)++) mat[i][j] = temp[i][j];
    b >>= 1;
  }
  printf("%d\n", ans[k][0]);
}
