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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;

public class ProblemC3 {
    private static final long B = 1_000_000_007L;
    BufferedReader rd;

    ProblemC3() throws IOException {
        rd = new BufferedReader(new InputStreamReader(System.in));
        compute();
    }

    private void compute() throws IOException {
        int[] a = intarr();
        int n = a[0];
        int m = a[1];
        List<List<Integer>> edges = createEdges(n);
        for(int i=0;i<n-1;i++) {
            a = intarr();
            addEdge(edges,a[0]-1,a[1]-1);
        }

        a = intarr();
        int k = a[0];
        int x = a[1];

        out(new Solver(k,x,m).solve(edges));
    }

    private void addEdge(List<List<Integer>> edges, int x, int y) {
        edges.get(x).add(y);
        edges.get(y).add(x);
    }

    private List<List<Integer>> createEdges(int n) {
        List<List<Integer>> edges = new ArrayList<>();
        for(int i=0;i<n;i++) {
            edges.add(new ArrayList<>());
        }
        return edges;
    }

    class Solver {
        final int k;
        final int x;
        final int m;

        public Solver(int k, int x, int m) {
            this.k = k;
            this.x = x;
            this.m = m;
        }
        private long solve(List<List<Integer>> edges) {
            int n = edges.size();

            int[] pa = new int[n];
            int[] order = new int[n];
            boolean[] vis = new boolean[n];
            Queue<Integer> q = new ArrayDeque<>();
            q.add(0);
            int p = 0;
            vis[0] = true;
            pa[0] = -1;
            while(!q.isEmpty()) {
                int u = q.poll();
                order[p++] = u;
                for(Integer v: edges.get(u)) {
                    if(!vis[v]) {
                        vis[v] = true;
                        pa[v] = u;
                        q.add(v);
                    }
                }
            }
            State[] st = new State[n];
            for(int i=0;i<n;i++) {
                st[i] = new State();
                st[i].init();
            }
            for(int i=n-1;i>=0;i--) {
                int u = order[i];
                int childCount = edges.get(u).size() - (u != 0?1:0);
                if(childCount > 0) {
                    State childState = null;
                    for(Integer v: edges.get(u)) {
                        if(v != pa[u]) {
                            if(childState == null) {
                                childState = st[v];
                            } else {
                                childState = childState.merge(st[v]);
                            }
                        }
                    }
                    st[u] = st[u].mergeUp(childState);
                }
            }
            return st[0].sum();
        }

        class State {
            long[] more;
            long[] eq;
            long[] less;

            private State() {
                more = new long[x+1];
                eq = new long[x+1];
                less = new long[x+1];
            }

            private void init() {
                more[0] = (m-k)%B;
                eq[1] = 1%B;
                less[0] = (k-1)%B;
            }

            public State merge(State state) {
                State merged = new State();
                int all = more.length;
                for(int i=0;i<all;i++) {
                    for (int j = 0; j < all; j++) {
                        int s = i + j;
                        if (s >= all) {
                            break;
                        }
                        merged.less[s] += (less[i] * state.less[j]) % B;
                        merged.less[s] %= B;

                        long g = 0;
                        g += (eq[i] * state.less[j]) % B;
                        g %= B;
                        g += (eq[i] * state.eq[j]) % B;
                        g %= B;
                        g += (eq[i] * state.more[j]) % B;
                        g %= B;
                        g += (less[i] * state.eq[j]) % B;
                        g %= B;
                        g += (more[i] * state.eq[j]) % B;
                        g %= B;
                        merged.eq[s] += g;
                        merged.eq[s] %= B;

                        g = 0;
                        g += (more[i] * state.less[j]) % B;
                        g %= B;
                        g += (less[i] * state.more[j]) % B;
                        g %= B;
                        g += (more[i] * state.more[j]) % B;
                        g %= B;
                        merged.more[s] += g;
                        merged.more[s] %= B;
                    }
                }
                return merged;
            }

            public State mergeUp(State childState) {
                State merged = new State();
                int all = more.length;
                for(int i=0;i<all;i++) {
                    for (int j = 0; j < all; j++) {
                        int s = i + j;
                        if (s >= all) {
                            break;
                        }
                        long pMore = more[i];
                        long pEq = eq[i];
                        long pLess = less[i];

                        long cMore = childState.more[j];
                        long cEq = childState.eq[j];
                        long cLess = childState.less[j];

                        merged.more[s] += (pMore * ((cMore + cLess)%B))%B;
                        merged.more[s] %= B;

                        merged.eq[s] += (pEq * cLess)%B;
                        merged.eq[s] %= B;

                        merged.less[s] += (pLess * ((cLess + cEq + cMore)%B))%B;
                        merged.less[s] %= B;
                    }
                }
                return merged;
            }

            public long sum() {
                long s = 0;
                for(long x: more) {
                    s += x;
                    s %= B;
                }
                for(long x: eq) {
                    s += x;
                    s %= B;
                }
                for(long x: less) {
                    s += x;
                    s %= B;
                }
                return s;
            }
        }

    }

    private int[] intarr() throws IOException {
        return intarr(rd.readLine());
    }

    private int[] intarr(String s) {
        String[] q = split(s);
        int n = q.length;
        int[] a = new int[n];
        for(int i=0;i<n;i++) {
            a[i] = Integer.parseInt(q[i]);
        }
        return a;
    }

    private String[] split(String s) {
        if(s == null) {
            return new String[0];
        }
        int n = s.length();
        int start = -1;
        int end = 0;
        int sp = 0;
        boolean lastWhitespace = true;
        for(int i=0;i<n;i++) {
            char c = s.charAt(i);
            if(isWhitespace(c)) {
                lastWhitespace = true;
            } else {
                if(lastWhitespace) {
                    sp++;
                }
                if(start == -1) {
                    start = i;
                }
                end = i;
                lastWhitespace = false;
            }
        }
        if(start == -1) {
            return new String[0];
        }
        String[] res = new String[sp];
        int last = start;
        int x = 0;
        lastWhitespace = true;
        for(int i=start;i<=end;i++) {
            char c = s.charAt(i);
            boolean w = isWhitespace(c);
            if(w && !lastWhitespace) {
                res[x++] = s.substring(last,i);
            } else if(!w && lastWhitespace) {
                last = i;
            }
            lastWhitespace = w;
        }
        res[x] = s.substring(last,end+1);
        return res;
    }

    private boolean isWhitespace(char c) {
        return c==' ' || c=='\t';
    }

    private static void out(Object x) {
        System.out.println(x);
    }

    public static void main(String[] args) throws IOException {
        new ProblemC3();
    }
}