#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 12, X = 11, MOD = (1e9 + 7);
long long n, m, k, x;
vector<long long> ad[N];
long long dp[N][X][3];
long long dp1[X], dp2[X], dp0[X];
long long sum(long long a = 0, long long b = 0, long long c = 0,
              long long d = 0) {
  return (a + b + c + d) % MOD;
}
long long mul(long long a = 1ll, long long b = 1ll, long long c = 1ll) {
  return (((a * b) % MOD) * c) % MOD;
}
void dfs(long long v, long long p) {
  dp[v][1][0] = 1;
  dp[v][0][1] = k - 1;
  dp[v][0][2] = m - k;
  for (auto u : ad[v]) {
    if (u != p) {
      dfs(u, v);
      for (long long i = 0; i < X; i++) dp1[i] = dp2[i] = dp0[i] = 0;
      for (long long i = 0; i < X; i++) {
        for (long long j = 0; j + i < X; j++) {
          dp0[i + j] = sum(dp0[i + j], mul(dp[v][i][0], dp[u][j][1]));
          dp1[i + j] =
              sum(dp1[i + j],
                  mul(dp[v][i][1], sum(dp[u][j][0], dp[u][j][1], dp[u][j][2])));
          dp2[i + j] =
              sum(dp2[i + j], mul(dp[v][i][2], sum(dp[u][j][1], dp[u][j][2])));
        }
      }
      for (long long i = 0; i < X; i++) {
        dp[v][i][0] = dp0[i];
        dp[v][i][1] = dp1[i];
        dp[v][i][2] = dp2[i];
      }
    }
  }
  return;
}
int32_t main() {
  cin >> n >> m;
  for (long long i = 1; i < n; i++) {
    long long u, v;
    cin >> u >> v;
    u--, v--;
    ad[u].push_back(v);
    ad[v].push_back(u);
  }
  cin >> k >> x;
  dfs(0, -1);
  long long ans = 0;
  for (long long i = 0; i <= x; i++) {
    for (long long j = 0; j < 3; j++) {
      ans = sum(ans, dp[0][i][j]);
    }
  }
  cout << ans;
  return 0;
}
