#include <bits/stdc++.h>
long long M = 1e9 + 7, n, b, k, x, i, j, lr, d[64], dp[64][128], c[128], f[128];
int main() {
  for (std::cin >> n >> b >> k >> x; std::cin >> i; dp[0][i % x]++)
    ;
  for (d[0] = 10, f[0] = 1, i = 0; i < 40;
       i++, d[i] = (d[i - 1] * d[i - 1]) % x) {
    for (j = 0; j < x && i; j++)
      for (lr = 0; lr < x;
           (dp[i][j] +=
            dp[i - 1][lr] * dp[i - 1][(j - lr * d[i - 1] % x + x) % x]) %= M,
          lr++)
        ;
    if (b & (1ll << i)) {
      for (j = x; j--;)
        for (lr = x; lr--;
             (c[j] += f[lr] * dp[i][(j - lr * d[i] % x + x) % x]) %= M)
          ;
      for (j = x; j--; f[j] = c[j], c[j] = 0)
        ;
    }
  }
  std::cout << f[k];
}
