#include <bits/stdc++.h>
using namespace std;
int n, m, k, x;
vector<int> adj[100010];
long long dp[100005][12][3];
void dfs(int src, int prv) {
  dp[src][0][0] = (k - 1);
  dp[src][1][1] = 1;
  dp[src][0][2] = (m - k);
  for (int i = 0; i < adj[src].size(); i++) {
    if (adj[src][i] == prv) continue;
    int tmp = adj[src][i];
    dfs(tmp, src);
    for (int j = x; j >= 0; j--) {
      long long a1 = 0, a2 = 0, a3 = 0;
      for (int k = j; k >= 0; k--) {
        a1 = (a1 +
              (dp[src][j - k][0] *
               (dp[tmp][k][1] + dp[tmp][k][0] + dp[tmp][k][2]) % 1000000007) %
                  1000000007) %
             1000000007;
        a2 = (a2 +
              (dp[src][j - k][1] * (dp[tmp][k][0]) % 1000000007) % 1000000007) %
             1000000007;
        a3 = (a3 + (dp[src][j - k][2] * (dp[tmp][k][0] + dp[tmp][k][2]) %
                    1000000007) %
                       1000000007) %
             1000000007;
      }
      dp[src][j][0] = a1;
      dp[src][j][1] = a2;
      dp[src][j][2] = a3;
    }
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  ;
  std::cin >> n >> m;
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    std::cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  std::cin >> k >> x;
  dfs(1, -1);
  long long ans = 0;
  for (int i = 0; i <= x; i++) {
    for (int j = 0; j <= 2; j++) {
      ans = (ans + dp[1][i][j]) % 1000000007;
    }
  }
  std::cout << ans << endl;
  return 0;
}
