#include <bits/stdc++.h>
using namespace std;
int m, k, x;
long long f[100005][3][11];
const int mod = 1e9 + 7;
void dfs(vector<vector<int>>& e, int i, int p) {
  f[i][0][0] = k - 1, f[i][1][1] = 1, f[i][2][0] = m - k;
  for (auto c : e[i]) {
    if (c != p) {
      dfs(e, c, i);
      vector<vector<long long>> tmp(3, vector<long long>(11));
      for (int j = x; j >= 0; j--) {
        for (int l = 0; l <= j; l++) {
          tmp[0][j] =
              (tmp[0][j] +
               1LL * (f[c][0][l] + f[c][1][l] + f[c][2][l]) * f[i][0][j - l]) %
              mod;
          tmp[1][j] = (tmp[1][j] + 1LL * f[c][0][l] * f[i][1][j - l]) % mod;
          tmp[2][j] =
              (tmp[2][j] + 1LL * (f[c][0][l] + f[c][2][l]) * f[i][2][j - l]) %
              mod;
        }
      }
      for (int j = 0; j < 3; j++) {
        for (int l = 0; l <= x; l++) {
          f[i][j][l] = tmp[j][l];
        }
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n >> m;
  n++;
  vector<vector<int>> e(n, vector<int>());
  for (int i = 1; i < n - 1; i++) {
    int j, l;
    cin >> j >> l;
    e[j].push_back(l);
    e[l].push_back(j);
  }
  cin >> k >> x;
  dfs(e, 1, 0);
  long long ans = 0;
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j <= x; j++) ans += f[1][i][j];
  }
  cout << ans % mod << endl;
}
