#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 5, mod = 1e9 + 7;
int n, m, k, x, dp[N][11][3], tmp[11][3];
int en, first[N], sz[N];
struct edge {
int e, next;
}ed[N * 2];
void add_edge(int s, int e) {
en++;
ed[en].e = e;
ed[en].next = first[s];
first[s] = en;
}
void init(int u, int fa) { // 预处理子树大小
sz[u] = 1;
for (int p = first[u]; p; p = ed[p].next) {
int e = ed[p].e;
if (e == fa) continue;
init(e, u);
sz[u] += sz[e];
}
}
void dfs(int u, int fa) {
dp[u][0][0] = k - 1;
dp[u][1][1] = 1;
dp[u][0][2] = m - k;
for (int p = first[u]; p; p = ed[p].next) {
int e = ed[p].e;
if (e == fa) continue;
dfs(e, u);
for (int j = 0; j <= x; j++) {
for (int k = 0; k < 3; k++) {
tmp[j][k] = dp[u][j][k];
dp[u][j][k] = 0;
}
}
for (int j = min(sz[u], x); j >= 0; j--) {
for (int k = 0; k <= min(sz[e], j); k++) {
dp[u][j][0] = (dp[u][j][0] + tmp[j - k][0] * (dp[e][k][0] + dp[e][k][1] + dp[e][k][2]) % mod) % mod;
dp[u][j][1] = (dp[u][j][1] + tmp[j - k][1] * dp[e][k][0] % mod) % mod;
dp[u][j][2] = (dp[u][j][2] + tmp[j - k][2] * (dp[e][k][0] + dp[e][k][2]) % mod) % mod;
}
}
}
}
signed main() {
// freopen("color.in", "r", stdin);
// freopen("color.out", "w", stdout);
cin >> n >> m;
for (int i = 1; i <= n - 1; i++) {
int u, v;
cin >> u >> v;
add_edge(u, v), add_edge(v, u);
}
cin >> k >> x;
init(1, -1);
dfs(1, -1);
int res = 0;
for (int i = 0; i <= x; i++) {
for (int j = 0; j < 3; j++) res = (res + dp[1][i][j]) % mod;
}
cout << res << endl;
}