#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
double eps = 1e-10;
using namespace std;
int n, b, k, md;
long long m[4][103][103], a[50004];
void mult(int idx1, int idx2) {
  for (int i = 0; i < md; i++)
    for (int j = 0; j < md; j++) {
      long long cur = 0;
      for (int k = 0; k < md; k++)
        cur = (cur + (m[idx1][i][k] * m[idx2][k][j]) % 1000000007) % 1000000007;
      m[3][i][j] = cur;
    }
}
void deg(int x) {
  if (x == 1) {
    for (int i = 0; i < md; i++)
      for (int j = 0; j < md; j++) m[3][i][j] = m[0][i][j];
    return;
  }
  deg(x / 2);
  for (int i = 0; i < md; i++)
    for (int j = 0; j < md; j++) m[1][i][j] = m[2][i][j] = m[3][i][j];
  for (int i = 0; i < md; i++)
    for (int j = 0; j < md; j++) m[3][i][j] = 0;
  mult(1, 2);
  for (int i = 0; i < md; i++)
    for (int j = 0; j < md; j++) m[1][i][j] = m[3][i][j];
  if (x % 2) {
    for (int i = 0; i < md; i++)
      for (int j = 0; j < md; j++) m[3][i][j] = 0;
    mult(0, 1);
  }
}
int main() {
  cin >> n >> b >> k >> md;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < md; i++)
    for (int j = 1; j <= n; j++) m[0][i][(10 * i + a[j]) % md]++;
  for (int i = 0; i < md; i++)
    for (int j = 0; j < md; j++) m[1][i][j] = m[2][i][j] = m[0][i][j];
  deg(b);
  long long ans = 0;
  cout << m[3][0][k] << endl;
}
