#include <bits/stdc++.h>
using namespace std;
inline int read(int f = 1, int x = 0, char ch = ' ') {
  while (!isdigit(ch = getchar()))
    if (ch == '-') f = -1;
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f * x;
}
const int N = 1e5 + 5, P = 1e9 + 7, X = 10 + 5;
int n, m, a, b;
vector<int> edge[N];
int f[N][X][3], ans;
int g[X][3];
void dfs(int x, int fa) {
  f[x][0][0] = a - 1;
  f[x][1][1] = 1;
  f[x][0][2] = m - a;
  for (int i = 0; i < edge[x].size(); ++i) {
    int y = edge[x][i];
    if (y == fa) continue;
    dfs(y, x);
    memcpy(g, f[x], sizeof(g));
    memset(f[x], 0, sizeof(f[x]));
    for (int j = b; ~j; --j)
      for (int k = b; ~k; --k)
        if (j >= k) {
          f[x][j][0] = (f[x][j][0] +
                        1ll * g[j - k][0] *
                            ((f[y][k][0] + f[y][k][1]) % P + f[y][k][2]) % P) %
                       P;
          f[x][j][2] =
              (f[x][j][2] + 1ll * g[j - k][2] * (f[y][k][0] + f[y][k][2]) % P) %
              P;
          f[x][j][1] = (f[x][j][1] + 1ll * g[j - k][1] * f[y][k][0] % P) % P;
        }
  }
}
int main() {
  n = read(), m = read();
  for (int i = 1; i < n; ++i) {
    int x = read(), y = read();
    edge[x].push_back(y);
    edge[y].push_back(x);
  }
  a = read();
  b = read();
  dfs(1, 0);
  for (int i = 0; i <= b; ++i)
    ans = (ans + ((f[1][i][0] + f[1][i][1]) % P + f[1][i][2]) % P) % P;
  printf("%d\n", ans);
  return 0;
}
