Problem: Harry, Ron and Hermione have figured out that Helga Hufflepuff's cup is a horcrux. Through her encounter with Bellatrix Lestrange, Hermione came to know that the cup is present in Bellatrix's family vault in Gringott's Wizarding Bank. 

The Wizarding bank is in the form of a tree with total n vaults where each vault has some type, denoted by a number between 1 to m. A tree is an undirected connected graph with no cycles.

The vaults with the highest security are of type k, and all vaults of type k have the highest security.

There can be at most x vaults of highest security. 

Also, if a vault is of the highest security, its adjacent vaults are guaranteed to not be of the highest security and their type is guaranteed to be less than k.

Harry wants to consider every possibility so that he can easily find the best path to reach Bellatrix's vault. So, you have to tell him, given the tree structure of Gringotts, the number of possible ways of giving each vault a type such that the above conditions hold.

Input

The first line of input contains two space separated integers, n and m — the number of vaults and the number of different vault types possible. (1 ≤ n ≤ 105, 1 ≤ m ≤ 109).

Each of the next n - 1 lines contain two space separated integers ui and vi (1 ≤ ui, vi ≤ n) representing the i-th edge, which shows there is a path between the two vaults ui and vi. It is guaranteed that the given graph is a tree.

The last line of input contains two integers k and x (1 ≤ k ≤ m, 1 ≤ x ≤ 10), the type of the highest security vault and the maximum possible number of vaults of highest security.

Output

Output a single integer, the number of ways of giving each vault a type following the conditions modulo 109 + 7.

Examples

Input

4 2
1 2
2 3
1 4
1 2


Output

1


Input

3 3
1 2
1 3
2 1


Output

13


Input

3 1
1 2
1 3
1 1


Output

0

Note

In test case 1, we cannot have any vault of the highest security as its type is 1 implying that its adjacent vaults would have to have a vault type less than 1, which is not allowed. Thus, there is only one possible combination, in which all the vaults have type 2.

Solution (in JAVA):

Solution:
import java.lang.*;
import java.lang.reflect.Array;
import java.math.*;
import java.util.*;
import java.io.*;

public class Main {
    void solve() {
        n=ni(); m=ni();
        g=new ArrayList[n+1];
        for(int i=1;i<=n;i++) g[i]=new ArrayList<>();
        for(int i=1;i<n;i++){
            int x=ni(),y=ni();
            g[x].add(y); g[y].add(x);
        }
        k=ni(); x=ni();
        dp=new long[n+1][x+1][3];
        dfs(1,-1);
        long ans=0;
        for(int j=0;j<=x;j++){
            ans=add(ans,dp[1][j][0],M);
            if(j>0)
            ans=add(ans,dp[1][j][1],M);
            ans=add(ans,dp[1][j][2],M);
        }

//        pw.println(dp[3][0][0]+" "+dp[3][1][0]);
//        pw.println(dp[3][1][1]);
//        pw.println(dp[3][0][2]+" "+dp[3][1][2]);

        pw.println(ans);
    }
    int n,m;
    int k,x;
    ArrayList<Integer> g[];
    long dp[][][];
    long dp2[][];
    long dp3[][];
    long dp4[][];
    ArrayList<Integer> vec=new ArrayList<>();
    void dfs(int v,int pr){

        for(int u : g[v]){
            if(u!=pr) dfs(u,v);
        }

        vec.clear();
        for(int u : g[v]){
            if(u!=pr) vec.add(u);
        }
        if(vec.size()==0){
            dp[v][0][0]=k-1;
            dp[v][1][1]=1;
            dp[v][0][2]=m-k;
            return;
        }
        int sz=vec.size();
        dp2=new long[sz+1][x+1];
        dp3=new long[sz+1][x+1];
        dp4=new long[sz+1][x+1];
         dp2[0][0]=dp3[0][0]=dp4[0][0]=1;


        for(int i=1;i<=sz;i++){
            int u=vec.get(i-1);
            for(int j=0;j<=x;j++){
                for(int k=0;k<=j;k++){
//                    dp2[i][j]=dp2[i-1][j-k]+dp[u][k][0];
//                    dp3[i][j]=dp3[i-1][j-k]+dp[u][k][1]+dp[u][k][2];
//                    dp4[i][j]=dp4[i-1][j-k]+dp[u][k][0]+dp[u][k][2];

                    dp2[i][j]=add(dp2[i][j],mul(dp2[i-1][j-k],add(add(dp[u][k][0],dp[u][k][1],M),dp[u][k][2],M),M),M);
                    dp3[i][j]=add(dp3[i][j],mul(dp3[i-1][j-k],dp[u][k][0],M),M);
                    dp4[i][j]=add(dp4[i][j],mul(dp4[i-1][j-k],add(dp[u][k][0],dp[u][k][2],M),M),M);
                    //if(v==2 && i==1 && j==0 && k==0) pw.println(dp[u][k][0]+" "+dp[u][k][2]+" "+v+" "+u);
                }
            }
        }

      //  pw.println(v+"YES");
        for(int j=0;j<=x;j++){

            dp[v][j][0]=mul(k-1,dp2[sz][j],M);
            if(j>0) dp[v][j][1]=mul(1,dp3[sz][j-1],M);
            dp[v][j][2]=mul(m-k,dp4[sz][j],M);
            //if(v==1) pw.println(j+" "+dp[v][j][0]+" "+dp[v][j][1]+" "+dp[v][j][2]);
        }
        //if(v==2) pw.println(dp[v][0][2]+" "+dp4[sz][0]);
        dp2=null; dp3=null; dp4=null;

    }
    long mul(long a,long b,long M){
        a*=b;
        if(a>=M) a%=M;
        return a;
    }
    long add(long a,long b,long M){
        a+=b;
        if(a>=M) a-=M;
        return a;
    }

    long M=(long)1e9+7;
    InputStream is;
    PrintWriter pw;
    String INPUT = "";
    void run() throws Exception {
        is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        pw = new PrintWriter(System.out);
        long s = System.currentTimeMillis();
        solve();
        pw.flush();
        if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");

    }

    public static void main(String[] args) throws Exception { new Main().run(); }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
    private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

    private double nd() { return Double.parseDouble(ns()); }
    private char nc() { return (char)skip(); }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }
}