There are b blocks of digits. Each one consisting of the same n digits, which are given to you in the input. Wet Shark must choose exactly one digit from each block and concatenate all of those digits together to form one large integer. For example, if he chooses digit 1 from the first block and digit 2 from the second block, he gets the integer 12. 

Wet Shark then takes this number modulo x. Please, tell him how many ways he can choose one digit from each block so that he gets exactly k as the final result. As this number may be too large, print it modulo 109 + 7.

Note, that the number of ways to choose some digit in the block is equal to the number of it's occurrences. For example, there are 3 ways to choose digit 5 from block 3 5 6 7 8 9 5 1 1 1 1 5.

Input

The first line of the input contains four space-separated integers, n, b, k and x (2 ≤ n ≤ 50 000, 1 ≤ b ≤ 109, 0 ≤ k < x ≤ 100, x ≥ 2) — the number of digits in one block, the number of blocks, interesting remainder modulo x and modulo x itself.

The next line contains n space separated integers ai (1 ≤ ai ≤ 9), that give the digits contained in each block.

Output

Print the number of ways to pick exactly one digit from each blocks, such that the resulting integer equals k modulo x.

Examples

Input

12 1 5 10
3 5 6 7 8 9 5 1 1 1 1 5


Output

3


Input

3 2 1 2
6 2 2


Output

0


Input

3 2 1 2
3 1 2


Output

6

Note

In the second sample possible integers are 22, 26, 62 and 66. None of them gives the remainder 1 modulo 2.

In the third sample integers 11, 13, 21, 23, 31 and 33 have remainder 1 modulo 2. There is exactly one way to obtain each of these integers, so the total answer is 6.
import java.io.*;
import java.util.*;

public class Equal {

	static ArrayList<Integer>[] adj;

	static boolean check(int[] arr) {
		boolean f = true;
		for (int i = 1; i < arr.length; i++) {
			f &= arr[i] >= arr[i - 1];
		}
		return f;
	}

	public static void main(String[] args) throws IOException {
		// BufferedReader br = new BufferedReader(new FileReader("name.in"));
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		PrintWriter pw = new PrintWriter(System.out);

		st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		int b = Integer.parseInt(st.nextToken());
		int k = Integer.parseInt(st.nextToken());
		int x = Integer.parseInt(st.nextToken());

		int[] occ = new int[10];
		st = new StringTokenizer(br.readLine());
		for (int i = 0; i < n; i++) {
			occ[Integer.parseInt(st.nextToken())]++;
		}
		int[][] mat = new int[x][x];
		for (int i = 0; i < occ.length; i++) {
			for (int j = 0; j < x; j++) {
				mat[(j*10+i)%x][j] += occ[i];
			}
		}

		int[][] end = new int[x][1];
		end[0][0] = 1;
		int[][] temp = matPow(mat, b);
//		System.out.println(Arrays.deepToString(mat));
//		System.out.println(Arrays.deepToString(temp));
		pw.println(matMul(temp, end, x, x, 1)[k][0]);

		pw.flush();

	}

	static int m = 1000000007;

	static int[][] matMul(int[][] A, int[][] B, int p, int q, int r) // C(p x r) = A(p x q) x (q x r) -- O(p x q x r)
	{
		int[][] C = new int[p][r];
		for (int i = 0; i < p; ++i)
			for (int j = 0; j < r; ++j)
				for (int k = 0; k < q; ++k) {
					C[i][j] += (A[i][k] * 1l * B[k][j]) % m;
					C[i][j] %= m;
				}
		return C;
	}

	/*
	 * 4. Square Matrix Exponentiation
	 */
	static int[][] matPow(int[][] base, long p) {
		int n = base.length;
		int[][] ans = new int[n][n];
		for (int i = 0; i < n; i++)
			ans[i][i] = 1;
		while (p != 0) {
			if ((p & 1) == 1)
				ans = matMul(ans, base, n, n, n);
			base = matMul(base, base, n, n, n);
			p >>= 1;
		}

		return ans;
	}

	static long powmod(long r, long e, long mod) {
		long ans = 1;
		r %= mod;
		while (e > 0) {
			if ((e & 1) == 1)
				ans = (int) ((ans * 1l * r) % mod);
			e >>= 1;
			r = (int) ((r * 1l * r) % mod);
		}
		return ans;
	}

	static class SegmentTree { // 1-based DS, OOP

		int N; // the number of elements in the array as a power of 2 (i.e. after padding)
		int[] array, sTree, lazy;

		SegmentTree(int[] in, int s) {
			array = in;
			N = in.length - 1;
			sTree = new int[N << 1]; // no. of nodes = 2*N - 1, we add one to cross out index zero
			lazy = new int[N << 1];
			build(1, 1, N, s);
		}

		void build(int node, int b, int e, int s) // O(n)
		{
			if (b == e)
				sTree[node] = array[b];
			else {
				int mid = b + e >> 1;
				build(node << 1, b, mid, s);
				build(node << 1 | 1, mid + 1, e, s);
				if (s == 0) {
					sTree[node] = Math.max(sTree[node << 1], sTree[node << 1 | 1]);
				} else {
					sTree[node] = Math.min(sTree[node << 1], sTree[node << 1 | 1]);

				}
			}
		}

		void update_point(int node, int val, int s) // O(log n)
		{
			node += N - 1;
			sTree[node] += val;
			while (node > 1) {
				node >>= 1;
				if (s == 0) {
					sTree[node] = Math.max(sTree[node << 1], sTree[node << 1 | 1]);
				} else {
					sTree[node] = Math.min(sTree[node << 1], sTree[node << 1 | 1]);

				}
			}
		}

		void update_range(int i, int j, int val) // O(log n)
		{
			update_range(1, 1, N, i, j, val);
		}

		void update_range(int node, int b, int e, int i, int j, int val) {
			if (i > e || j < b)
				return;
			if (b >= i && e <= j) {
				sTree[node] += (e - b + 1) * val;
				lazy[node] += val;
			} else {
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node << 1, b, mid, i, j, val);
				update_range(node << 1 | 1, mid + 1, e, i, j, val);
				sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
			}

		}

		void propagate(int node, int b, int mid, int e) {
			lazy[node << 1] += lazy[node];
			lazy[node << 1 | 1] += lazy[node];
			sTree[node << 1] += (mid - b + 1) * lazy[node];
			sTree[node << 1 | 1] += (e - mid) * lazy[node];
			lazy[node] = 0;
		}

		int query(int i, int j, int s) {
			return query(1, 1, N, i, j, s);
		}

		int query(int node, int b, int e, int i, int j, int s) // O(log n)
		{
			if (i > e || j < b) {
				if (s == 0)
					return 0;
				return Integer.MAX_VALUE / 2;
			}
			if (b >= i && e <= j)
				return sTree[node];
			int mid = b + e >> 1;
			propagate(node, b, mid, e);
			int q1 = query(node << 1, b, mid, i, j, s);
			int q2 = query(node << 1 | 1, mid + 1, e, i, j, s);
			if (s == 0)
				return Math.max(q1, q2);
			else
				return Math.min(q1, q2);

		}

	}

	static class pair implements Comparable<pair> {
		int x;
		int y;

		public pair(int d, int u) {
			x = d;
			y = u;
		}

		@Override
		public int compareTo(pair o) {
			// TODO Auto-generated method stub
			return y - o.y;
		}

		@Override
		public String toString() {
			// TODO Auto-generated method stub
			return x + " " + y;
		}

	}

}