#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
const int MAX_N = 1e5 + 10;
const long long INF = 1e18;
const long long delta = 10957;
using namespace std;
int n, m, x, k;
vector<int> g[MAX_N];
long long dp[MAX_N][12][3];
void dfs(int v, int p) {
  if (g[v].size() == 1) {
    dp[v][0][0] = k - 1;
    dp[v][1][1] = 1;
    dp[v][0][2] = m - k;
    return;
  }
  vector<int> np;
  for (auto x : g[v])
    if (x != p) dfs(x, v), np.push_back(x);
  int t = np.size();
  long long d[t][x + 1];
  for (int i = 0; i < t; ++i)
    for (int j = 0; j <= x; ++j) d[i][j] = 0;
  d[0][0]++;
  int mfl = np[0];
  for (int i = 0; i <= x; ++i)
    d[0][i] = dp[mfl][i][0] + dp[mfl][i][1] + dp[mfl][i][2];
  for (int i = 1; i < t; ++i) {
    int u = np[i];
    for (int j = 0; j <= x; ++j) {
      for (int f = 0; f <= j; ++f) {
        d[i][j] += (d[i - 1][j - f] *
                    ((dp[u][f][1] + dp[u][f][0] + dp[u][f][2]) % MOD)) %
                   MOD;
        d[i][j] %= MOD;
      }
    }
  }
  for (int i = 0; i <= x; ++i) {
    dp[v][i][0] = (k - 1) * d[t - 1][i];
    dp[v][i][2] %= MOD;
    dp[v][i][0] %= MOD;
  }
  for (int i = 0; i < t; ++i)
    for (int j = 0; j <= x; ++j) d[i][j] = 0;
  d[0][0]++;
  mfl = np[0];
  for (int i = 0; i <= x; ++i) d[0][i] = dp[mfl][i][0];
  for (int i = 1; i < t; ++i) {
    int u = np[i];
    for (int j = 0; j <= x; ++j) {
      for (int f = 0; f <= j; ++f) {
        d[i][j] += (d[i - 1][j - f] * ((dp[u][f][0]) % MOD)) % MOD;
        d[i][j] %= MOD;
      }
    }
  }
  for (int i = 0; i <= x; ++i) {
    if (i) dp[v][i][1] += d[t - 1][i - 1];
  }
  for (int i = 0; i < t; ++i)
    for (int j = 0; j <= x; ++j) d[i][j] = 0;
  d[0][0]++;
  mfl = np[0];
  for (int i = 0; i <= x; ++i) d[0][i] = dp[mfl][i][0] + dp[mfl][i][2];
  for (int i = 1; i < t; ++i) {
    int u = np[i];
    for (int j = 0; j <= x; ++j) {
      for (int f = 0; f <= j; ++f) {
        d[i][j] +=
            (d[i - 1][j - f] * ((dp[u][f][0] + dp[u][f][2]) % MOD)) % MOD;
        d[i][j] %= MOD;
      }
    }
  }
  for (int i = 0; i <= x; ++i) {
    dp[v][i][2] = ((m - k) * d[t - 1][i]) % MOD;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cout.tie();
  cin.tie();
  cin >> n >> m;
  int a, b;
  for (int i = 1; i < n; ++i)
    cin >> a >> b, g[a].push_back(b), g[b].push_back(a);
  cin >> k >> x;
  int v;
  for (int i = 1; i <= n; ++i)
    if (g[i].size() > 1) {
      v = i;
      break;
    }
  dfs(v, 0);
  long long ans = 0;
  for (int i = 0; i <= x; ++i) {
    ans += (((dp[v][i][0] + dp[v][i][1]) % MOD) + dp[v][i][2]) % MOD,
        ans %= MOD;
  }
  cout << ans;
  return 0;
}
