10
4 108 114
5 30 155
8 193 197
9 71 169
2 163 166
8 120 144
8 22 151
4 21 166
2 46 127
8 38 51
 20
9 142 172
7 132 256
8 245 315
9 496 496
3 345 362
8 13 162
5 342 470
9 16 488
9 467 482
4 471 478
10 92 224
6 228 261
9 54 167
2 402 409
5 9 10
7 225 360
3 438 483
6 252 342
3 491 493
6 296 367
 1
8 1234567890123 123456789012345

0
3
0
1
3
0
5
16
9
1
 0
0
0
0
4
6
13
7
0
0
1
2
3
0
0
2
12
9
1
4
 774752389568

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int N, M, K, X;
vector<int> g[100100];
vector<long long> dp[100100][3];
int mx[100100];
int hs[100100];
inline vector<long long> ad(const vector<long long>& a,
                            const vector<long long>& b, int d) {
  vector<long long> res(d + 1);
  for (int i = 0; i <= d; i++) {
    res[i] = (a[i] + b[i]) % MOD;
  }
  return res;
}
inline vector<long long> ms(const vector<long long>& a, long long c, int d) {
  vector<long long> res(d + 1);
  for (int i = 0; i <= d; i++) {
    res[i] = (a[i] * c) % MOD;
  }
  return res;
}
inline vector<long long> mull(const vector<long long>& a,
                              const vector<long long>& b, int d) {
  vector<long long> res(d + 1);
  for (int i = 0; i <= d; i++) {
    for (int j = 0; i + j <= d; j++) {
      res[i + j] = (res[i + j] + a[i] * b[j] % MOD) % MOD;
    }
  }
  return res;
}
void dfs(int v, int p) {
  for (int j = 0; j < 3; j++) {
    dp[v][j] = vector<long long>(X + 1);
    if (j == 1)
      dp[v][j][0] = K - 1;
    else if (j == 2)
      dp[v][j][0] = M - K;
    else
      dp[v][j][1] = 1;
  }
  for (int w : g[v]) {
    if (w == p) continue;
    dfs(w, v);
    dp[v][0] = mull(dp[v][0], dp[w][1], X);
    vector<long long> tmp = ad(dp[w][1], dp[w][2], X);
    dp[v][2] = mull(dp[v][2], tmp, X);
    tmp = ad(tmp, dp[w][0], X);
    dp[v][1] = mull(dp[v][1], tmp, X);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> N >> M;
  for (int i = 0; i < N - 1; i++) {
    int v, w;
    cin >> v >> w;
    g[v].push_back(w);
    g[w].push_back(v);
  }
  cin >> K >> X;
  dfs(1, 0);
  long long res = 0;
  for (int i = 0; i <= X; i++) {
    res += (dp[1][0][i] + dp[1][1][i] + dp[1][2][i]);
    res %= MOD;
  }
  cout << res << '\n';
  return 0;
}
