#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int MAXN = 1e5 + 1;
const int MAXK = 11;
const int MOD = 1e9 + 7;
vector<int> g[MAXN];
long long dp[MAXN][3][MAXK];
long long sdp[3][MAXK];
int m, k, x;
void fast_io() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void dfs(int u, int p) {
  dp[u][0][0] = k - 1;
  dp[u][1][1] = 1;
  dp[u][2][0] = m - k;
  for (auto v : g[u]) {
    if (v == p) continue;
    dfs(v, u);
    memset(sdp, 0, sizeof(sdp));
    for (int i = 0; i <= x; i++) {
      for (int j = 0; j <= i; j++) {
        sdp[0][i] +=
            dp[u][0][i - j] * (dp[v][0][j] + dp[v][1][j] + dp[v][2][j]) % MOD,
            sdp[0][i] %= MOD;
        sdp[1][i] += dp[u][1][i - j] * (dp[v][0][j]) % MOD, sdp[1][i] %= MOD;
        sdp[2][i] += dp[u][2][i - j] * (dp[v][0][j] + dp[v][2][j]) % MOD,
            sdp[2][i] %= MOD;
      }
    }
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j <= x; j++) dp[u][i][j] = sdp[i][j];
    }
  }
}
int main() {
  fast_io();
  int n, u, v;
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  cin >> k >> x;
  dfs(1, 1);
  int ans = 0;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j <= x; j++) {
      ans += dp[1][i][j];
      if (ans >= MOD) ans -= MOD;
    }
  }
  cout << ans << '\n';
  return 0;
}
