#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int n, m;
vector<int> e[100005];
int k, x;
ll dp[100005][3][12];
void dfs(int v, int pre) {
  ll ks[2][3][12] = {};
  int parity = 0;
  ks[parity][0][0] = k - 1;
  ks[parity][1][1] = 1;
  ks[parity][2][0] = m - k;
  for (int u : e[v]) {
    if (u == pre) continue;
    parity = !parity;
    dfs(u, v);
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j <= x; j++) {
        ks[parity][i][j] = 0;
      }
    }
    for (int i = 0; i <= x; i++) {
      for (int j = 0; j + i <= x; j++) {
        ks[parity][0][i + j] =
            (ks[parity][0][i + j] +
             (ks[!parity][0][j] * (dp[u][0][i] + dp[u][1][i] + dp[u][2][i]))) %
            mod;
        ks[parity][1][i + j] =
            (ks[parity][1][i + j] + (ks[!parity][1][j] * (dp[u][0][i]))) % mod;
        ks[parity][2][i + j] =
            (ks[parity][2][i + j] +
             (ks[!parity][2][j] * (dp[u][0][i] + dp[u][2][i]))) %
            mod;
      }
    }
  }
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j <= x; j++) {
      dp[v][i][j] = ks[parity][i][j];
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
  cin >> k >> x;
  dfs(1, 0);
  ll 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 << '\n';
  return 0;
}
