#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 15, M = 11, mod = 1e9 + 7;
int tree[N][M][3];
vector<int> adj[N];
void dfs(int root, int p, int m, int k) {
  int a, b, c, d;
  int temp[M][3];
  tree[root][0][0] = k - 1;
  tree[root][1][1] = 1;
  tree[root][0][2] = m - k;
  for (int i = 0; i < adj[root].size(); ++i) {
    int u = adj[root][i];
    if (u == p) continue;
    memset(temp, 0, sizeof(temp));
    dfs(u, root, m, k);
    for (a = 0; a < M; ++a) {
      for (b = 0; b < 3; ++b) {
        for (c = 0; a + c < M; ++c)
          for (d = 0; d < 3; ++d) {
            if (b <= d && b == 1) continue;
            if (d <= b && d == 1) continue;
            long long T = (long long)tree[root][a][b] * tree[u][c][d];
            T %= mod;
            temp[a + c][b] = (temp[a + c][b] + T) % mod;
          }
      }
    }
    for (a = 0; a < M; ++a)
      for (b = 0; b < 3; ++b) tree[root][a][b] = temp[a][b];
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  int a, b;
  for (int i = 0; i < n - 1; ++i) {
    scanf("%d%d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  int k, x;
  cin >> k >> x;
  dfs(1, 0, m, k);
  int ret = 0;
  for (int i = 0; i <= x; ++i)
    for (int j = 0; j < 3; ++j) ret = (ret + tree[1][i][j]) % mod;
  cout << ret << endl;
  return 0;
}
