#include <bits/stdc++.h>
using namespace std;
int n, X;
vector<int> G[100000 + 5];
long long dp[100000 + 1][10 + 1][3], m, pk, tmp[10 + 1][3], ans;
int siz[100000 + 1];
void dfs(int x, int fa) {
  dp[x][0][0] = (pk - 1) % 1000000007;
  dp[x][1][1] = 1;
  dp[x][0][2] = (m - pk + 1000000007) % 1000000007;
  siz[x] = 1;
  for (int i = 0; i < G[x].size(); i++) {
    int nxt = G[x][i];
    if (nxt == fa) continue;
    dfs(nxt, x);
    memset(tmp, 0, sizeof(tmp));
    for (int j = 0; j <= siz[x]; j++)
      for (int k = 0; k <= siz[nxt]; k++)
        if (j + k <= X) {
          tmp[j + k][0] =
              (tmp[j + k][0] + (dp[x][j][0] * (dp[nxt][k][0] + dp[nxt][k][1] +
                                               dp[nxt][k][2]))) %
              1000000007;
          tmp[j + k][1] =
              (tmp[j + k][1] + dp[x][j][1] * dp[nxt][k][0]) % 1000000007;
          tmp[j + k][2] =
              (tmp[j + k][2] + dp[x][j][2] * (dp[nxt][k][0] + dp[nxt][k][2])) %
              1000000007;
        }
    siz[x] = min(siz[x] + siz[nxt], X);
    for (int j = 0; j <= siz[x]; j++)
      for (int k = 0; k < 3; k++) dp[x][j][k] = tmp[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("%lld%lld", &pk, &X);
  dfs(1, -1);
  for (int j = 0; j <= siz[1]; j++)
    for (int k = 0; k < 3; k++) ans = (ans + dp[1][j][k]) % 1000000007;
  printf("%lld", ans);
}
