#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 4;
const long long mod = 1e9 + 7;
int n, m, k, x;
vector<int> g[N], tree[N];
void read() {
  cin >> n >> m;
  for (int i = 1; i < n; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  cin >> k >> x;
}
int parent[N];
bool usedDfs[N];
int depht[N];
queue<int> q;
void dfsUpBfs() {
  q.push(1);
  while (q.size()) {
    int v = q.front();
    q.pop();
    for (int to : g[v]) {
      if (usedDfs[to]) {
        continue;
      }
      q.push(to);
      usedDfs[to] = 1;
      depht[to] = depht[v] + 1;
      parent[to] = v;
    }
  }
}
int bfs[N];
bool cmp(int u, int v) {
  if (depht[u] != depht[v]) {
    return depht[u] > depht[v];
  }
  return u < v;
}
int dpTab[N][11][2][2];
int** prefDpTab[11][2][2][2];
void setTree() {
  dfsUpBfs();
  bfs[1] = 1;
  for (int i = 2; i <= n; ++i) {
    tree[parent[i]].push_back(i);
    bfs[i] = i;
  }
  sort(bfs + 1, bfs + 1 + n, cmp);
  for (int xj = 0; xj <= x; ++xj) {
    for (int px = 0; px < 2; ++px) {
      for (int sx = 0; sx < 2; ++sx) {
        for (int down = 0; down < 2; ++down) {
          prefDpTab[xj][px][sx][down] = (int**)calloc(n + 4, sizeof(int*));
          for (int i = 1; i <= n; ++i) {
            prefDpTab[xj][px][sx][down][i] =
                (int*)calloc(tree[i].size(), sizeof(int));
            for (int j = 0; j < tree[i].size(); ++j) {
              prefDpTab[xj][px][sx][down][i][j] = -1;
            }
          }
        }
      }
    }
  }
}
int dp(int v, int xi, bool px, bool sx);
int pref_dp(int v, int to, int xi, bool px, bool sx, bool down);
int pref_dp(int v, int to, int xi, bool px, bool sx, bool down) {
  if (xi < 0 || (sx && px)) {
    return 0;
  }
  int& res = prefDpTab[xi][px][sx][down][v][to];
  if (res != -1) {
    return res;
  }
  res = 0;
  if (to == 0) {
    if (down) {
      res = dp(tree[v][to], xi, sx, 1);
    } else {
      res = dp(tree[v][to], xi, sx, 0);
    }
  } else {
    for (int xnew = 0; xnew <= xi; ++xnew) {
      int pref0 = pref_dp(v, to - 1, xnew, px, sx, 0);
      int tmp0 = dp(tree[v][to], xi - xnew, sx, 0);
      if (down) {
        int tmp1 = dp(tree[v][to], xi - xnew, sx, 1);
        int pref1 = pref_dp(v, to - 1, xnew, px, sx, 1);
        res = ((long long)res + (long long)pref0 * (long long)tmp1 +
               (long long)pref1 * (long long)tmp1 +
               (long long)pref1 * (long long)tmp0) %
              mod;
      } else {
        res = ((long long)res + (long long)pref0 * (long long)tmp0) % mod;
      }
    }
  }
  return res;
}
int dp(int v, int xi, bool px, bool sx) {
  if ((sx && px) || (!xi && sx)) {
    return 0;
  }
  if (tree[v].empty()) {
    if (sx) {
      return xi == 1;
    } else {
      if (xi) {
        return 0;
      }
      if (px) {
        return k - 1;
      } else {
        return m - 1;
      }
    }
  }
  int& res = dpTab[v][xi][px][sx];
  if (sx) {
    int valPrefInX = pref_dp(v, tree[v].size() - 1, xi - 1, px, sx, 0);
    int valPrefInY = pref_dp(v, tree[v].size() - 1, xi - 1, px, sx, 1);
    res = (valPrefInX + valPrefInY) % mod;
  } else {
    int valPrefOutX = pref_dp(v, tree[v].size() - 1, xi, px, sx, 0);
    int valPrefOutY = pref_dp(v, tree[v].size() - 1, xi, px, sx, 1);
    if (px) {
      res = (((long long)valPrefOutX * (long long)(k - 1)) % mod +
             ((long long)valPrefOutY * (long long)(k - 1)) % mod) %
            mod;
    } else {
      res = (((long long)valPrefOutX * (long long)(m - 1)) % mod +
             ((long long)valPrefOutY * (long long)(k - 1)) % mod) %
            mod;
    }
  }
  return res;
}
void solve() {
  read();
  setTree();
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= x; ++j) {
      dp(bfs[i], j, 0, 0);
      dp(bfs[i], j, 0, 1);
      dp(bfs[i], j, 1, 0);
      dp(bfs[i], j, 1, 1);
    }
  }
  int ans = 0;
  for (int i = 0; i <= x; ++i) {
    int res1 = dp(1, i, 0, 1);
    int res2 = dp(1, i, 0, 0);
    int res = (res1 + res2) % mod;
    ans = (ans + res) % mod;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  solve();
  return 0;
}
