#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
const int md = 1e9 + 7;
int f[maxn][12][3], n, m, k, x, tmp[12][3];
vector<int> g[maxn];
void dfs(int p, int fa) {
  for (int i = 0; i < g[p].size(); i++) {
    int v = g[p][i];
    if (v == fa) continue;
    dfs(v, p);
  }
  f[p][0][0] = k - 1;
  f[p][1][1] = 1;
  f[p][0][2] = m - k;
  for (int i = 0; i < g[p].size(); i++) {
    int v = g[p][i];
    if (v == fa) continue;
    for (int j = 0; j <= x; j++)
      for (int l = 0; l < 3; l++) tmp[j][l] = 0;
    for (int j = 0; j <= x; j++)
      for (int l = 0; l < 3; l++)
        for (int j1 = 0; j1 <= j; j1++)
          for (int l1 = 0; l1 < 3; l1++) {
            if ((l == 1 && l1 != 0) || (l1 == 1 && l != 0)) continue;
            tmp[j][l] =
                (tmp[j][l] + (long long)f[p][j - j1][l] * f[v][j1][l1] % md) %
                md;
          }
    for (int j = 0; j <= x; j++)
      for (int l = 0; l < 3; l++) f[p][j][l] = tmp[j][l];
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  scanf("%d%d", &k, &x);
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= x; i++)
    for (int j = 0; j < 3; j++) ans = (ans + f[1][i][j]) % md;
  printf("%d\n", ans);
  return 0;
}
