#include <bits/stdc++.h>
const int mod = 1000000007;
int cnt[10];
long long mat[105][105], ans[105][105], tmp[105][105];
int n, b, k, x, a;
void powm(int x, int n) {
  for (int i = 0; i < n; i++) {
    ans[i][i] = 1;
  }
  while (x) {
    if (x & 1) {
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          tmp[i][j] = 0;
        }
      }
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          for (int k = 0; k < n; k++) {
            tmp[i][j] = (tmp[i][j] + ans[i][k] * mat[k][j] % mod) % mod;
          }
        }
      }
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
          ans[i][j] = tmp[i][j];
        }
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        tmp[i][j] = 0;
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        for (int k = 0; k < n; k++) {
          tmp[i][j] = (tmp[i][j] + mat[i][k] * mat[k][j] % mod) % mod;
        }
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        mat[i][j] = tmp[i][j];
      }
    }
    x >>= 1;
  }
}
int main() {
  scanf("%d%d%d%d", &n, &b, &k, &x);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    cnt[a]++;
  }
  for (int i = 0; i < x; i++) {
    for (int j = 0; j < 10; j++) {
      mat[i][(i * 10 + j) % x] += cnt[j];
    }
  }
  powm(b, x);
  printf("%lld\n", ans[0][k]);
  return 0;
}
