#include <bits/stdc++.h>
using namespace std;
long long dp[11][3], f[100010][11][3];
int n, m, K, sz[100010], c;
vector<int> g[100010];
void dfs(int x, int fa) {
  sz[x] = 1;
  f[x][1][0] = 1;
  f[x][0][1] = K - 1;
  f[x][0][2] = c - K;
  for (int i = 0; i < g[x].size(); i++) {
    int y = g[x][i];
    if (y == fa) continue;
    dfs(y, x);
    sz[x] += sz[y];
    memset(dp, 0, sizeof(dp));
    for (int j = 0; j <= sz[x] && j <= m; j++)
      for (int k = 0; k <= sz[y] && j + k <= m; k++) {
        dp[j + k][0] =
            (dp[j + k][0] + f[x][j][0] * f[y][k][1] % 1000000007) % 1000000007;
        dp[j + k][2] = (dp[j + k][2] +
                        f[x][j][2] * (f[y][k][1] + f[y][k][2]) % 1000000007) %
                       1000000007;
        dp[j + k][1] =
            (dp[j + k][1] +
             f[x][j][1] * (f[y][k][0] + f[y][k][1] + f[y][k][2]) % 1000000007) %
            1000000007;
      }
    for (int j = 0; j <= sz[x] && j <= m; j++)
      for (int k = 0; k < 3; k++) f[x][j][k] = dp[j][k];
  }
}
int main() {
  scanf("%d%d", &n, &c);
  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", &K, &m);
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i <= m; i++)
    for (int j = 0; j < 3; j++) ans = (ans + f[1][i][j]) % 1000000007;
  printf("%I64d\n", ans);
}
