#include <bits/stdc++.h>
using namespace std;
const int N = 100003, K = 13;
const int MOD = 1e9 + 7;
int f[N][K][3], w[K][3], s[N];
int n, m, mk, x;
unsigned long long res;
vector<int> g[N];
void dfs(int u, int fa) {
  s[u] = 1;
  f[u][0][0] = mk - 1;
  f[u][1][1] = 1;
  f[u][0][2] = m - mk;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == fa) continue;
    dfs(v, u);
    memset(w, 0, sizeof w);
    for (int j = 0; j <= s[u] && j <= x; j++)
      for (int k = 0; k <= s[v] && j + k <= x; k++)
        w[j + k][0] = (w[j + k][0] + (unsigned long long)f[u][j][0] *
                                         ((unsigned long long)f[v][k][0] +
                                          f[v][k][1] + f[v][k][2])) %
                      MOD,
              w[j + k][1] =
                  (w[j + k][1] + (unsigned long long)f[u][j][1] * f[v][k][0]) %
                  MOD,
              w[j + k][2] = (w[j + k][2] + (unsigned long long)f[u][j][2] *
                                               ((unsigned long long)f[v][k][0] +
                                                f[v][k][2])) %
                            MOD;
    s[u] = min(s[u] + s[v], x);
    for (int j = 0; j <= s[u]; j++)
      for (int k = 0; k < 3; k++) f[u][j][k] = w[j][k];
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  scanf("%d%d", &mk, &x);
  dfs(1, 0);
  for (int i = 0; i <= s[1]; i++)
    for (int j = 0; j < 3; j++)
      res = (res + (unsigned long long)f[1][i][j]) % MOD;
  printf("%d\n", res);
  return 0;
}
