#include <bits/stdc++.h>
using namespace std;
vector<int> E[100005];
int n, m, k, x;
const int mod = 1e9 + 7;
int dp[100005][3][11];
void dfs(int v, int p) {
  int a[3][11] = {}, b[3][11] = {};
  for (int i = 0; i < 3; ++i)
    for (int j = 0; j <= x; ++j) a[i][j] = b[i][j] = 0;
  a[0][0] = a[1][0] = a[2][0] = 1;
  for (auto u : E[v]) {
    if (u != p) {
      dfs(u, v);
      for (int i = 0; i <= x; ++i) {
        for (int j = 0; j <= x; ++j) {
          if (i + j > x) continue;
          int temp = dp[u][0][j];
          b[1][i + j] = (b[1][i + j] + (long long)a[1][i] * temp % mod) % mod;
          temp = (temp + dp[u][2][j]) % mod;
          b[2][i + j] = (b[2][i + j] + (long long)a[2][i] * temp % mod) % mod;
          temp = (temp + dp[u][1][j]) % mod;
          b[0][i + j] = (b[0][i + j] + (long long)a[0][i] * temp % mod) % mod;
        }
      }
      for (int i = 0; i < 3; ++i)
        for (int j = 0; j <= x; ++j) a[i][j] = b[i][j], b[i][j] = 0;
    }
  }
  for (int i = 0; i <= x; ++i) {
    dp[v][0][i] = (long long)a[0][i] * (k - 1) % mod;
    if (i >= 1) dp[v][1][i] = a[1][i - 1];
    dp[v][2][i] = (long long)a[2][i] * (m - k) % mod;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1, u, v; i < n; ++i) {
    cin >> u >> v;
    E[u].push_back(v);
    E[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 = (ans + dp[1][i][j]) % mod;
  cout << ans << endl;
  return 0;
}
