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.*;
import java.math.*;

public final class wet_blocks
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	static int[] cnt;
	static long mod=(long)(1e9+7);
	
	static long[][] matrix_mul(long[][] a,long[][] b,int r1,int c1,int r2,int c2) throws Exception
	{
		if(c1!=r2) throw new Exception("Impossible matrix multiplication!");
		
		long[][] c=new long[r1][c2];
		
		for(int i=0;i<r1;i++)
		{
			for(int j=0;j<c2;j++)
			{
				for(int k=0;k<c1;k++)
				{
					long curr=(a[i][k]*b[k][j])%mod;
					
					c[i][j]=(c[i][j]+curr)%mod;
				}
			}
		}
		
		return c;
	}
	
	static long[][] id(int n)
	{
		long[][] ret=new long[n][n];
		
		for(int i=0;i<n;i++)	
		{
			ret[i][i]=1;
		}
		
		return ret;
	}
	
	static long[][] matrix_pow(long[][] a,long b,int n) throws Exception
	{
		long[][] x=id(n),y=a;
		
		while(b>0)
		{
			if(b%2==1)
			{
				x=matrix_mul(x,y,n,n,n,n);
			}
			
			y=matrix_mul(y,y,n,n,n,n);b=b/2;
		}
		
		return x;
	}
	
    public static void main(String args[]) throws Exception
    {
		int n=sc.nextInt(),b=sc.nextInt(),k=sc.nextInt(),x=sc.nextInt();cnt=new int[x];
		
		for(int i=0;i<n;i++)
		{
			int curr=sc.nextInt()%x;
			
			cnt[curr]++;
		}
	
		long[][] arr=new long[x][x];
		
		for(int i=0;i<x;i++)
		{
			for(int j=0;j<x;j++)
			{
				int curr=((i*10)+j)%x;
				
				arr[i][curr]+=cnt[j];
			}
		}
		
		long[][] val=new long[1][x];
		
		for(int i=0;i<x;i++)
		{
			val[0][i]=cnt[i];
		}
		
		long[][] res=matrix_pow(arr,b-1,x);
		
		long[][] f=matrix_mul(val,res,1,x,x,x);
		
		out.println(f[0][k]);out.close();
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}