#include <bits/stdc++.h>
using namespace std;
struct data {
  int child, sibling;
  data() {}
  data(int _child, int _sibling) {
    child = _child;
    sibling = _sibling;
  }
  void init() { child = sibling = -1; }
};
vector<int> L[100005];
data G[100005];
void DFS(int u, int pd) {
  int last = -1;
  G[u].init();
  for (int j = 0, v; j < L[u].size(); j++) {
    v = L[u][j];
    if (v == pd) continue;
    if (last == -1)
      G[u].child = v;
    else
      G[last].sibling = v;
    DFS(v, u);
    last = v;
  }
}
int n;
long long m, k;
int memo[100005][11][3];
int DP(int u, int cant, int prev) {
  if (u == -1) return cant == 0;
  int &ret = memo[u][cant][prev];
  if (ret != -1) return ret;
  long long ans = 0, aux;
  for (int i = 0; i <= cant; i++) {
    if (prev == 0 || prev == 2) {
      if (prev == 0 && i < cant) {
        aux = DP(G[u].child, i, 1);
        ans += (aux * DP(G[u].sibling, cant - 1 - i, prev)) % 1000000007;
      }
      aux = ((m - k) * DP(G[u].child, i, 2)) % 1000000007;
      ans += (aux * DP(G[u].sibling, cant - i, prev)) % 1000000007;
      aux = ((k - 1) * DP(G[u].child, i, 0)) % 1000000007;
      ans += (aux * DP(G[u].sibling, cant - i, prev)) % 1000000007;
    } else {
      aux = ((k - 1) * DP(G[u].child, i, 0)) % 1000000007;
      ans += (aux * DP(G[u].sibling, cant - i, prev)) % 1000000007;
    }
  }
  return ret = ans % 1000000007;
}
int main() {
  while (scanf("%d%I64d", &n, &m) == 2) {
    int u, v;
    for (int i = 0; i < n - 1; i++) {
      scanf("%d%d", &u, &v);
      u--;
      v--;
      L[u].push_back(v);
      L[v].push_back(u);
    }
    DFS(0, 0);
    memset(memo, -1, sizeof memo);
    int x;
    cin >> k >> x;
    long long ans = 0;
    for (int i = 0; i <= x; i++) {
      ans += DP(0, i, 0);
      if (ans >= 1000000007) ans -= 1000000007;
    }
    cout << ans << endl;
  }
}
