#include <bits/stdc++.h>
using namespace std;
const int N = (int)2e5 + 10;
const int M = (int)2e6 + 7;
const long long LINF = (long long)1e18;
const int INF = (int)1e9 + 7;
const double EPS = (double)1e-9;
int n, m, k, cnt;
vector<int> v[N];
int dp[N][3][11];
int add(int x, int y) {
  x += y;
  if (x >= INF) x -= INF;
  return x;
}
int mult(int x, int y) { return 1ll * x * y % INF; }
void dfs(int x, int p = -1) {
  for (auto it : v[x]) {
    if (it == p) continue;
    dfs(it, x);
  }
  vector<int> redp;
  for (int j = 0; j <= cnt; j++) redp.push_back(0);
  redp[0] = 1;
  for (auto it : v[x]) {
    if (it == p) continue;
    vector<int> go;
    for (int j = 0; j <= cnt; j++) go.push_back(0);
    for (int sum = cnt; sum >= 0; sum--) {
      for (int y = 0; y <= sum; y++) {
        go[sum] = add(go[sum], mult(redp[sum - y], dp[it][0][y]));
      }
    }
    for (int sum = 0; sum <= cnt; sum++) {
      redp[sum] = go[sum];
    }
  }
  for (int sum = cnt; sum >= 1; sum--) {
    dp[x][1][sum] = redp[sum - 1];
  }
  for (int j = 0; j <= cnt; j++) redp[j] = 0;
  redp[0] = 1;
  for (auto it : v[x]) {
    if (it == p) continue;
    vector<int> go;
    for (int j = 0; j <= cnt; j++) go.push_back(0);
    for (int sum = cnt; sum >= 0; sum--) {
      for (int y = 0; y <= sum; y++) {
        int cur = add(dp[it][0][y], dp[it][1][y]);
        cur = add(cur, dp[it][2][y]);
        go[sum] = add(go[sum], mult(redp[sum - y], cur));
      }
    }
    for (int sum = 0; sum <= cnt; sum++) {
      redp[sum] = go[sum];
    }
  }
  for (int sum = cnt; sum >= 0; sum--) {
    dp[x][0][sum] = mult(k - 1, redp[sum]);
  }
  for (int j = 0; j <= cnt; j++) redp[j] = 0;
  redp[0] = 1;
  for (auto it : v[x]) {
    if (it == p) continue;
    vector<int> go;
    for (int j = 0; j <= cnt; j++) go.push_back(0);
    for (int sum = cnt; sum >= 0; sum--) {
      for (int y = 0; y <= sum; y++) {
        int cur = add(dp[it][0][y], dp[it][2][y]);
        go[sum] = add(go[sum], mult(redp[sum - y], cur));
      }
    }
    for (int sum = 0; sum <= cnt; sum++) {
      redp[sum] = go[sum];
    }
  }
  for (int sum = cnt; sum >= 0; sum--) {
    dp[x][2][sum] = mult(m - k, redp[sum]);
  }
}
int main() {
  srand(time(0));
  cin >> n >> m;
  for (int i = 1, x, y; i < n; i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  cin >> k >> cnt;
  dfs(1);
  int ans = 0;
  for (int i = 0; i <= cnt; i++) {
    ans = add(ans, dp[1][0][i]);
    ans = add(ans, dp[1][1][i]);
    ans = add(ans, dp[1][2][i]);
  }
  cout << ans;
  return 0;
}
