#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > adj;
const int MOD = 1000000007;
int K, M;
vector<int> mem[100010][11][3];
int dp(int u, int p, int ch, int x, int myType) {
  if (x < 0) return 0;
  if (adj[u].size() == ch) return x == 0;
  if (adj[u][ch] == p) return dp(u, p, ch + 1, x, myType);
  if (mem[u][x][myType][ch] != -1) return mem[u][x][myType][ch];
  long long w = 0;
  for (int chType = 0; chType <= 2; ++chType) {
    if (chType == 1 && x == 0) continue;
    if (chType == 1 && myType == 1) continue;
    if (chType == 1 && myType == 2) continue;
    if (chType == 2 && myType == 1) continue;
    int nx = x - (chType == 1);
    long long t = 0;
    for (int i = 0; i <= nx; ++i) {
      t = (t + dp(adj[u][ch], u, 0, i, chType) * 1LL *
                   dp(u, p, ch + 1, nx - i, myType)) %
          MOD;
    }
    if (chType == 0) t = (t * (K - 1));
    if (chType == 2) t = (t * (M - K));
    w = (t + w);
  }
  return mem[u][x][myType][ch] = w % MOD;
}
int main(int argc, char *argv[]) {
  int N;
  cin >> N >> M;
  adj = vector<vector<int> >(N);
  for (int i = 0; i < N - 1; ++i) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j <= 10; ++j) {
      for (int k = 0; k <= 2; ++k) {
        mem[i][j][k] = vector<int>(adj[i].size(), -1);
      }
    }
  }
  int X;
  cin >> K >> X;
  long long an = 0;
  for (int j = 0; j <= 2; ++j) {
    long long t = 0;
    for (int i = 0; i <= X; ++i) t += dp(0, -1, 0, i - (j == 1), j);
    if (j == 0) t = (t * (K - 1)) % MOD;
    if (j == 2) t = (t * (M - K)) % MOD;
    an = (an + t) % MOD;
  }
  cout << an << endl;
  return 0;
}
