#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int maxn = 100009;
vector<int> e[maxn];
int f[maxn][12][3];
int n, m, K, x, a, b, c, ans;
void dfs(int u, int fa) {
  f[u][0][0] = K - 1;
  f[u][1][1] = 1;
  f[u][0][2] = m - K;
  int a, b, c;
  for (int i = 0; i < e[u].size(); i++)
    if (e[u][i] != fa) {
      dfs(e[u][i], u);
      for (int j = x; j >= 0; j--) {
        a = b = c = 0;
        for (int k = 0; k <= j; k++) {
          a = (a + 1LL * f[u][j - k][0] *
                       (1LL * f[e[u][i]][k][0] + 1LL * f[e[u][i]][k][1] +
                        1LL * f[e[u][i]][k][2])) %
              MOD;
          b = (b + 1LL * f[u][j - k][2] *
                       (1LL * f[e[u][i]][k][0] + 1LL * f[e[u][i]][k][2])) %
              MOD;
          c = (c + 1LL * f[u][j - k][1] * f[e[u][i]][k][0]) % MOD;
        }
        f[u][j][0] = a;
        f[u][j][2] = b;
        f[u][j][1] = c;
      }
    }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d%d", &a, &b);
    e[a].push_back(b);
    e[b].push_back(a);
  }
  scanf("%d%d", &K, &x);
  dfs(1, 0);
  for (int i = 0; i <= x; i++) {
    ans = (ans + f[1][i][0]) % MOD;
    ans = (ans + f[1][i][1]) % MOD;
    ans = (ans + f[1][i][2]) % MOD;
  }
  printf("%d\n", ans);
  return 0;
}
