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.math.BigInteger;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Main2 {

    static long mod = 1000000007L;
    static FastScanner scanner;

    static long m;
    static long k;

    public static void main(String[] args) {
        scanner = new FastScanner();
        int n = scanner.nextInt();
        m = scanner.nextLong();

        List<Integer>[] ints = new List[n];
        for (int i = 0; i < n; i++) ints[i] = new ArrayList<>();

        for (int i = 0; i < n-1; i++) {
            int u = scanner.nextInt() - 1;
            int v = scanner.nextInt() - 1;
            ints[u].add(v);
            ints[v].add(u);
        }
        k = scanner.nextLong();
        int x = scanner.nextInt();

        Node root = buildTree(ints, 0);
        root.walk();
        long res = 0;
        for (int i = 0; i <= x; i++) {
            res = (res + Math.max(root.beAll[i], 0)) % mod;
        }
        System.out.println(res);
    }

    static boolean[] visited = new boolean[100010];

    static Node buildTree(List<Integer>[] ints, int cur) {
        if (visited[cur]) {
            return null;
        }
        visited[cur] = true;
        Node n = new Node();
        for (int nxt : ints[cur]) {
            Node ch = buildTree(ints, nxt);
            if (ch != null) {
                n.childs.add(ch);
            }
        }
        return n;
    }

    static int AFTER_IDEAL = 1;
    static int ANY = 2;

    static class Node {
        List<Node> childs = new ArrayList<>();
        long[] beLowerK = new long[20];
        long[] beAll = new long[20];
        long[] beNonDirect = new long[20];
        int max = 1;

        public Node() {
            //Arrays.fill(beAll, -1);
            //Arrays.fill(beNonDirect, -1);
            //Arrays.fill(beLowerK, -1);
        }

        /*
5 6
1 2
2 3
2 4
2 5
3 2
         */

        long walk() {
            if (childs.isEmpty()) {
                beLowerK[0] = k - 1;
                beLowerK[1] = 0;
                beNonDirect[0] = m - 1;
                beNonDirect[1] = 0;
                beAll[0] = m - 1;
                beAll[1] = 1;
                return 0 ;
            }
            for (Node c : childs) {
                c.walk();
            }

            long[] childNonDirect = new long[childs.get(0).max + 1];
            long[] childAll = new long[childs.get(0).max + 1];
            long[] childLower = new long[childs.get(0).max + 1];

            boolean firstChild = true;
            int curMax = 0;
            for (Node c : childs) {
                if (firstChild) {
                    for (int j = 0; j <= c.max; j++) {
                        childLower[j] = c.beLowerK[j];
                        childNonDirect[j] = c.beNonDirect[j];
                        childAll[j] = c.beAll[j];
                    }

                    firstChild = false;
                    curMax = c.max;
                    continue;
                }
                long[] nChildNonDirect = new long[curMax + c.max + 1];
                long[] nChildAll = new long[curMax + c.max + 1];
                long[] nChildLower = new long[curMax + c.max + 1];
                /*Arrays.fill(nChildLower, 1);
                Arrays.fill(nChildNonDirect, 1);
                Arrays.fill(nChildAll, 1);*/
                for (int i = 0; i <= curMax; i++) {
                    for (int j = 0; j <= c.max; j++) {
                        nChildNonDirect[i + j] = (nChildNonDirect[i + j] + ((childNonDirect[i] * c.beNonDirect[j]) % mod)) % mod;
                        nChildLower[i + j] = (nChildLower[i + j] + ((childLower[i] * c.beLowerK[j]) % mod)) % mod;
                        nChildAll[i + j] = (nChildAll[i + j] + ((childAll[i] * c.beAll[j]) % mod)) % mod;
                    }
                }
                childNonDirect = nChildNonDirect;
                childLower = nChildLower;
                childAll = nChildAll;
                curMax = Math.min(11, curMax + c.max);
            }


            max = curMax;
            for (int i = 0; i <= max; i++) {
                beLowerK[i] = (childAll[i] * (k - 1)) % mod;
                //beNonDirect[i] = ((childAll[i] * (k - 1)) % mod + (childNonDirect[i] * (m - k)) % mod) % mod;
                beAll[i] = ((childNonDirect[i] * (m - 1)) % mod + (MathUtils.submod(childAll[i], childNonDirect[i], mod) * (k - 1) % mod)) % mod;
                beNonDirect[i] = beAll[i];
            }
            if (max < 11) {
                max = max + 1;
                beNonDirect[max] = 0;
                beLowerK[max] = 0;
                beAll[max] = 0;
            }
            for (int i = 1; i <= max; i++) {
                beAll[i] = (beAll[i] + childLower[i - 1]) % mod;
            }

            return 0;
        }
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            try {
                return br.readLine();
            } catch (Exception e) {
                e.printStackTrace();
                throw new RuntimeException();
            }
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

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

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

        int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) res[i] = nextInt();
            return res;
        }

        long[] nextLongArray(int n) {
            long[] res = new long[n];
            for (int i = 0; i < n; i++) res[i] = nextLong();
            return res;
        }

        String[] nextStringArray(int n) {
            String[] res = new String[n];
            for (int i = 0; i < n; i++) res[i] = nextToken();
            return res;
        }
    }

    static class PrefixSums {
        long[] sums;

        public PrefixSums(long[] sums) {
            this.sums = sums;
        }

        public long sum(int fromInclusive, int toExclusive) {
            if (fromInclusive > toExclusive) throw new IllegalArgumentException("Wrong sum");
            return sums[toExclusive] - sums[fromInclusive];
        }

        public static PrefixSums of(int[] ar) {
            long[] sums = new long[ar.length + 1];
            for (int i = 1; i <= ar.length; i++) {
                sums[i] = sums[i - 1] + ar[i - 1];
            }
            return new PrefixSums(sums);
        }

        public static PrefixSums of(long[] ar) {
            long[] sums = new long[ar.length + 1];
            for (int i = 1; i <= ar.length; i++) {
                sums[i] = sums[i - 1] + ar[i - 1];
            }
            return new PrefixSums(sums);
        }
    }

    static class ADUtils {
        static void sort(int[] ar) {
            Random rnd = ThreadLocalRandom.current();
            for (int i = ar.length - 1; i > 0; i--)
            {
                int index = rnd.nextInt(i + 1);
                // Simple swap
                int a = ar[index];
                ar[index] = ar[i];
                ar[i] = a;
            }
            Arrays.sort(ar);
        }

        static void sort(long[] ar) {
            Random rnd = ThreadLocalRandom.current();
            for (int i = ar.length - 1; i > 0; i--)
            {
                int index = rnd.nextInt(i + 1);
                // Simple swap
                long a = ar[index];
                ar[index] = ar[i];
                ar[i] = a;
            }
            Arrays.sort(ar);
        }
    }

    static class MathUtils {
        static long modpow(long b, long e, long m) {
            long result = 1;

            while (e > 0) {
                if ((e & 1) == 1) {
            /* multiply in this bit's contribution while using modulus to keep
             * result small */
                    result = (result * b) % m;
                }
                b = (b * b) % m;
                e >>= 1;
            }

            return result;
        }

        static long submod(long x, long y, long m) {
            return (x - y + m) % m;
        }
    }
}

//3 3