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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 4;
const long long mod = 1e9 + 7;
int n, m, k, x;
vector<int> g[N], tree[N];
void read() {
  cin >> n >> m;
  for (int i = 1; i < n; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  cin >> k >> x;
}
int parent[N];
bool usedDfs[N];
int depht[N];
queue<int> q;
void dfsUpBfs() {
  q.push(1);
  while (q.size()) {
    int v = q.front();
    q.pop();
    for (int to : g[v]) {
      if (usedDfs[to]) {
        continue;
      }
      q.push(to);
      usedDfs[to] = 1;
      depht[to] = depht[v] + 1;
      parent[to] = v;
    }
  }
}
int bfs[N];
bool cmp(int u, int v) {
  if (depht[u] != depht[v]) {
    return depht[u] > depht[v];
  }
  return u < v;
}
int dpTab[N][11][2][2];
int** prefDpTab[11][2][2][2];
void setTree() {
  dfsUpBfs();
  bfs[1] = 1;
  for (int i = 2; i <= n; ++i) {
    tree[parent[i]].push_back(i);
    bfs[i] = i;
  }
  sort(bfs + 1, bfs + 1 + n, cmp);
  for (int xj = 0; xj <= x; ++xj) {
    for (int px = 0; px < 2; ++px) {
      for (int sx = 0; sx < 2; ++sx) {
        for (int down = 0; down < 2; ++down) {
          prefDpTab[xj][px][sx][down] = (int**)calloc(n + 4, sizeof(int*));
          for (int i = 1; i <= n; ++i) {
            prefDpTab[xj][px][sx][down][i] =
                (int*)calloc(tree[i].size(), sizeof(int));
            for (int j = 0; j < tree[i].size(); ++j) {
              prefDpTab[xj][px][sx][down][i][j] = -1;
            }
          }
        }
      }
    }
  }
}
int dp(int v, int xi, bool px, bool sx);
int pref_dp(int v, int to, int xi, bool px, bool sx, bool down);
int pref_dp(int v, int to, int xi, bool px, bool sx, bool down) {
  if (xi < 0 || (sx && px)) {
    return 0;
  }
  int& res = prefDpTab[xi][px][sx][down][v][to];
  if (res != -1) {
    return res;
  }
  res = 0;
  if (to == 0) {
    if (down) {
      res = dp(tree[v][to], xi, sx, 1);
    } else {
      res = dp(tree[v][to], xi, sx, 0);
    }
  } else {
    for (int xnew = 0; xnew <= xi; ++xnew) {
      int pref0 = pref_dp(v, to - 1, xnew, px, sx, 0);
      int tmp0 = dp(tree[v][to], xi - xnew, sx, 0);
      if (down) {
        int tmp1 = dp(tree[v][to], xi - xnew, sx, 1);
        int pref1 = pref_dp(v, to - 1, xnew, px, sx, 1);
        res = ((long long)res + (long long)pref0 * (long long)tmp1 +
               (long long)pref1 * (long long)tmp1 +
               (long long)pref1 * (long long)tmp0) %
              mod;
      } else {
        res = ((long long)res + (long long)pref0 * (long long)tmp0) % mod;
      }
    }
  }
  return res;
}
int dp(int v, int xi, bool px, bool sx) {
  if ((sx && px) || (!xi && sx)) {
    return 0;
  }
  if (tree[v].empty()) {
    if (sx) {
      return xi == 1;
    } else {
      if (xi) {
        return 0;
      }
      if (px) {
        return k - 1;
      } else {
        return m - 1;
      }
    }
  }
  int& res = dpTab[v][xi][px][sx];
  if (sx) {
    int valPrefInX = pref_dp(v, tree[v].size() - 1, xi - 1, px, sx, 0);
    int valPrefInY = pref_dp(v, tree[v].size() - 1, xi - 1, px, sx, 1);
    res = (valPrefInX + valPrefInY) % mod;
  } else {
    int valPrefOutX = pref_dp(v, tree[v].size() - 1, xi, px, sx, 0);
    int valPrefOutY = pref_dp(v, tree[v].size() - 1, xi, px, sx, 1);
    if (px) {
      res = (((long long)valPrefOutX * (long long)(k - 1)) % mod +
             ((long long)valPrefOutY * (long long)(k - 1)) % mod) %
            mod;
    } else {
      res = (((long long)valPrefOutX * (long long)(m - 1)) % mod +
             ((long long)valPrefOutY * (long long)(k - 1)) % mod) %
            mod;
    }
  }
  return res;
}
void solve() {
  read();
  setTree();
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= x; ++j) {
      dp(bfs[i], j, 0, 0);
      dp(bfs[i], j, 0, 1);
      dp(bfs[i], j, 1, 0);
      dp(bfs[i], j, 1, 1);
    }
  }
  int ans = 0;
  for (int i = 0; i <= x; ++i) {
    int res1 = dp(1, i, 0, 1);
    int res2 = dp(1, i, 0, 0);
    int res = (res1 + res2) % mod;
    ans = (ans + res) % mod;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  solve();
  return 0;
}