#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T BM(T p, T e, T M) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T mdINV(T a, T M) {
  return BM(a, M - 2, M);
}
template <class T>
inline T PW(T p, T e) {
  long long int ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p);
    p = (p * p);
  }
  return (T)ret;
}
template <class T>
bool ISLEFT(T a, T b, T c) {
  if (((a.first.first - b.first.first) * (b.second.second - c.second.second) -
       (b.first.first - c.first.first) * (a.second.second - b.second.second)) <
      0.0)
    return 1;
  else
    return 0;
}
long long int m, first, ko;
vector<int> v[100004 + 2];
long long int dp[4][100004 + 2][12];
void dfs(int u, int p) {
  bool fl = 0;
  long long int ans[3][12];
  long long int ans1[3][12];
  long long int ans3[3][12];
  bool f = 0;
  for (int i = 0; i < v[u].size(); i++) {
    int x1 = v[u][i];
    if (x1 == p) continue;
    dfs(x1, u);
    f ^= 1;
    if (fl == 0) {
      for (int k = 0; k <= ko; k++) {
        ans[f][k] = (dp[1][x1][k] + dp[2][x1][k] + dp[3][x1][k]) % 1000000007ll;
        ans1[f][k] = dp[1][x1][k];
        ans3[f][k] = (dp[1][x1][k] + dp[3][x1][k]) % 1000000007ll;
      }
    } else {
      memset(ans[f], 0, sizeof ans[f]);
      memset(ans1[f], 0, sizeof ans1[f]);
      memset(ans3[f], 0, sizeof ans3[f]);
      for (int j = 0; j <= ko; j++) {
        for (int l = 0; l <= j; l++) {
          long long int va =
              (dp[1][x1][l] + dp[2][x1][l] + dp[3][x1][l]) * ans[f ^ 1][j - l];
          va %= 1000000007ll;
          ans[f][j] = (ans[f][j] + va) % 1000000007ll;
          long long int va1 = ans1[f ^ 1][j - l] * dp[1][x1][l];
          va1 %= 1000000007ll;
          ans1[f][j] = (va1 + ans1[f][j]) % 1000000007ll;
          long long int va2 =
              (dp[1][x1][l] + dp[3][x1][l]) * ans3[f ^ 1][j - l];
          va2 %= 1000000007ll;
          ans3[f][j] = (ans3[f][j] + va2) % 1000000007ll;
        }
      }
    }
    fl = 1;
  }
  if (!fl) {
    dp[1][u][0] = first - 1;
    dp[2][u][1] = 1;
    dp[3][u][0] = m - first;
  } else {
    for (int i = 0; i <= ko; i++) {
      dp[1][u][i] = (ans[f][i] * (first - 1)) % 1000000007ll;
      if (i > 0) dp[2][u][i] = ans1[f][i - 1];
      dp[3][u][i] = (ans3[f][i] * (m - first)) % 1000000007ll;
    }
  }
}
int main() {
  int n;
  scanf("%d", &n);
  scanf("%lld", &m);
  for (int i = 1; i <= n - 1; i++) {
    int first, second;
    scanf("%d%d", &first, &second);
    v[first].push_back(second);
    v[second].push_back(first);
  }
  scanf("%lld%lld", &first, &ko);
  dfs(1, -1);
  long long int res = 0;
  for (int i = 0; i <= ko; i++) {
    res = (res + dp[1][1][i] + dp[2][1][i] + dp[3][1][i]) % 1000000007ll;
  }
  printf("%lld", res), printf("\n");
  return 0;
}
