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 Codeshefcode{
	public static void main(String[] args) throws IOException{
		Solver Machine = new Solver() ;
		Machine.Solve() ;
		Machine.Finish() ;
	}	
}
class Solver{
  final long r = 1000000007 ;	
  FasterScanner ip = new FasterScanner() ;	  
  PrintWriter op = new PrintWriter(System.out) ;
  void Solve() throws IOException{
	  int n = ip.i() ;
	  long b = ip.l() ;
	  int k = ip.i() ;
	  int x = ip.i() ;
	  long freq[] = new long[x] ;
	  for(int i=0 ; i<n ; i++)
		  freq[ip.i()%x]++ ;
	  long mat[][] = new long[x][x] ;
	  for(int i=0 ; i<x ; i++)
		  for(int j=0 ; j<x ; j++){
			  long ct=0 ;
			  int rem=(10*i)%x ;
			  for(int l=0 ; l<x ; l++)
				  if((rem+l)%x==j)
					  ct+=freq[l] ;
			  mat[i][j]=ct ;
		  }
	  MatrixOperations machine = new MatrixOperations(x) ;
	  long powmat[][] = machine.Pow(mat,b-1) ;
	  long ans[] = machine.m(freq,powmat) ;
	  op.println(ans[k]) ; 
  }  
    void Finish(){
	  op.flush();
	  op.close();
  }
}
@SuppressWarnings("serial")
class MyList extends ArrayList<Integer>{
	
}
class MatrixOperations{
	final static long r = 1000000007 ;
	long[][] I ;
	int N ;
	MatrixOperations(int size){
		N=size ;
		I = new long[N][N] ;
		for(int i=0 ; i<N ; i++)
			for(int j=0 ; j<N ; j++)
				I[i][j]=(i==j) ? 1 : 0 ;
	}
	long[][] m(long[][] A1,long[][] A2){
		long A[][] = new long[N][N] ;
		for(int i=0 ; i<N ; i++)
			for(int j=0 ; j<N ; j++){
				long t=0 ;
				for(int k=0 ; k<N ; k++)
					t = (t+(A1[i][k]*A2[k][j])%r)%r ;
				A[i][j]=t ;
			}	
		return A ;
	}
	long[][] Pow(long[][] A,long pow){
		if(pow==0)
			return I ;
		if(pow==1)
			return A ;
		long[][] hp = Pow(A,pow/2) ;
		long[][] fp = m(hp,hp) ;
		if(pow%2==0)
			return fp ;
		else
			return m(A,fp) ;
	}
	long[] m(long[] vec,long[][] mat){
		long ans[] = new long[N] ;
		for(int i=0 ; i<N ; i++){
			long t=0 ;
			for(int k=0 ; k<N ; k++)
				t=(t+(vec[k]*mat[k][i])%r)%r ;
			ans[i]=t ;
		}
		return ans ;
	}
}
class pair implements Comparable<pair>{
	private int x  ;
	private int y ;
	pair(int a,int b){
		x=a ;
		y=b ;		
	}
	public int getx(){
		return x ;
	}
	public int gety(){
		return y ;
	}
	@Override
	public int compareTo(pair p){
		if(this.x<p.x)
			return -1 ;
		if(this.x==p.x){
			if(this.y<p.y)
				return -1 ;
			if(this.y==p.y)
			  return 0 ;
			return 1 ;			
		}
		return 1 ;
	}
}
class ModOp{
	final static private long r=1000000007 ;
	static long D(long a , long b){
		return (a*ModInverse(b))%r ;
	}
	static long m(long a , long b){
		return (a*b)%r ;
	}
	static long ModInverse(long a ){
	return FastPowr(a,r-2) ;	
		
	}
	static long FastPowr(long a , long b){
		if(b==0)
		    return 1 ;
		if(b==1)
			return a ;
		long halfpow = FastPowr(a,b/2) ;
		if(b%2==0)
			return (halfpow*halfpow)%r ;
		else
			return (((halfpow*halfpow)%r)*a)%r ;		
    }	
}
class FasterScanner { 
    private InputStream mIs;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars; 
    public FasterScanner() {
        this(System.in);
    } 
    public FasterScanner(InputStream is) {
        mIs = is;
    } 
    public int read() {
        if (numChars == -1) 
            throw new InputMismatchException();    
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = mIs.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0) 
                return -1;            
        }
        return buf[curChar++];
    } 
    public String nextLine(){
        int c = read();
        while (isSpaceChar(c)) 
            c = read();        
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isEndOfLine(c));
        return res.toString();
    } 
    public String S(){
        int c = read();
        while (isSpaceChar(c)) 
            c = read();        
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        }while (!isSpaceChar(c));
        return res.toString();
    } 
    public long l(){
        int c = read();
        while (isSpaceChar(c)) 
            c = read();        
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do{
           if (c < '0' || c > '9') 
               throw new InputMismatchException();
           res *= 10;
           res += c - '0';
           c = read();
        }while(!isSpaceChar(c));
        return res * sgn;
    } 
    public int i(){
        int c = read() ;
        while (isSpaceChar(c))
            c = read();        
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do{
            if (c < '0' || c > '9') 
                throw new InputMismatchException();            
            res *= 10;
            res += c - '0';
            c = read();
        }while (!isSpaceChar(c));
        return res * sgn;
    } 
    public boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    } 
    public boolean isEndOfLine(int c) {
        return c == '\n' || c == '\r' || c == -1;
    } 
}  