#include <bits/stdc++.h>
using namespace std;
template <typename _T>
inline void _DBG(const char *s, _T x) {
  cerr << s << " = " << x << "\n";
}
template <typename _T, typename... args>
void _DBG(const char *s, _T x, args... a) {
  while (*s != ',') cerr << *s++;
  cerr << " = " << x << ',';
  _DBG(s + 1, a...);
}
const int N = 1e5 + 7;
const int M = 1e9 + 7;
int n, x;
long long m, K, dp[N][3][11];
vector<int> G[N];
void dfs(int v, int f) {
  for (auto u : G[v])
    if (u != f) dfs(u, v);
  dp[v][0][0] = K - 1, dp[v][1][1] = 1, dp[v][2][0] = m - K;
  for (auto u : G[v]) {
    if (u == f) continue;
    vector<vector<long long> > tmp(3, vector<long long>(11, 0));
    for (int s = 0; s <= x; s++)
      for (int k = 0; k <= s; k++)
        tmp[0][s] +=
            (dp[u][0][k] + dp[u][1][k] + dp[u][2][k]) * dp[v][0][s - k] % M;
    for (int s = 0; s <= x; s++)
      for (int k = 0; k <= s; k++)
        tmp[1][s] += dp[u][0][k] * dp[v][1][s - k] % M;
    for (int s = 0; s <= x; s++)
      for (int k = 0; k <= s; k++)
        tmp[2][s] += (dp[u][0][k] + dp[u][2][k]) * dp[v][2][s - k] % M;
    for (int i = 0; i < 3; i++)
      for (int j = 0; j <= x; j++) dp[v][i][j] = tmp[i][j] % M;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  cin >> K >> x;
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i < 3; i++)
    for (int j = 0; j <= x; j++) ans = (ans + dp[1][i][j]) % M;
  cout << ans << "\n";
  return 0;
}
