#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const int MOD = 1000000007;
vector<int> adj[111111];
long long DP[111111][4][11];
int M, K, X;
long long _DP2[111111][2][4][11];
void go(int v, int p = -1) {
  auto DP2 = _DP2[v];
  int w = 0;
  for (int j = 0; j < (4); ++j)
    for (int k = 0; k < (X + 1); ++k) DP2[w][j][k] = 0;
  DP2[w][0][0] = 1;
  for (int u : adj[v])
    if (u != p) {
      go(u, v);
      w = 1 - w;
      for (int j = 0; j < (4); ++j)
        for (int k = 0; k < (X + 1); ++k) DP2[w][j][k] = 0;
      for (int j = 0; j < (4); ++j)
        for (int k = 0; k < (X + 1); ++k)
          for (int ju = 0; ju < (4); ++ju)
            for (int ku = 0; ku < (X - k + 1); ++ku) {
              DP2[w][j | ju][k + ku] += DP2[1 - w][j][k] * DP[u][ju][ku] % MOD;
            }
      for (int j = 0; j < (4); ++j)
        for (int k = 0; k < (X + 1); ++k) DP2[w][j][k] %= MOD;
    }
  for (int j = 0; j < (4); ++j)
    for (int k = 0; k < (X + 1); ++k)
      DP[v][0][k] += (K - 1) * DP2[w][j][k] % MOD;
  for (int k = 0; k < (X); ++k) DP[v][2][k + 1] += DP2[w][0][k];
  for (int j = 0; j < (2); ++j)
    for (int k = 0; k < (X + 1); ++k)
      DP[v][1][k] += (M - K) * DP2[w][j][k] % MOD;
  for (int j = 0; j < (4); ++j)
    for (int k = 0; k < (X + 1); ++k) DP[v][j][k] %= MOD;
}
int main() {
  int N;
  scanf("%d%d", &N, &M);
  for (int i = 0; i < (N - 1); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a, --b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  scanf("%d%d", &K, &X);
  go(0);
  long long result = 0;
  for (int j = 0; j < (4); ++j)
    for (int i = 0; i < (X + 1); ++i) result += DP[0][j][i];
  result %= MOD;
  printf("%d\n", (int)result);
}
