#include <bits/stdc++.h>
using ll = long long;
using poly = std::vector<int>;
const int mod = 998244353;
const int maxn = 2e5 + 17;
int n, son[maxn], size[maxn], rev[maxn << 3], f[maxn << 3], g[maxn << 3],
    fac[maxn];
ll x;
std::vector<int> ch[maxn];
int dec(int x) { return x >= mod ? x - mod : x; }
int qpow(int a, int b) {
  if (b == 0) return 1;
  ll d = qpow(a, b >> 1);
  d = d * d % mod;
  if (b & 1) d = d * a % mod;
  return d;
}
void NTT(int *a, int lim, int flag) {
  for (int i = 1; i < lim; ++i)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) * (lim >> 1));
  for (int i = 0; i < lim; ++i)
    if (i < rev[i]) std::swap(a[i], a[rev[i]]);
  for (int i = 1; i < lim; i <<= 1) {
    int wn = qpow(3, (mod - 1) / (i << 1));
    if (flag == -1) wn = qpow(wn, mod - 2);
    for (int j = 0; j < lim; j += (i << 1))
      for (int k = 0, w = 1; k < i; ++k, w = (ll)w * wn % mod) {
        int a0 = a[j + k], a1 = (ll)w * a[j + k + i] % mod;
        a[j + k] = dec(a0 + a1);
        a[j + k + i] = dec(a0 - a1 + mod);
      }
  }
  if (flag == -1)
    for (int i = 0, inv = qpow(lim, mod - 2); i < lim; ++i)
      a[i] = (ll)a[i] * inv % mod;
}
poly mul(poly A, poly B) {
  int len = A.size() + B.size() - 1;
  int lim = 1;
  while (lim <= len) lim <<= 1;
  for (int i = 0; i < lim; ++i) {
    f[i] = g[i] = 0;
  }
  for (int i = 0; i < A.size(); ++i) f[i] = A[i];
  for (int i = 0; i < B.size(); ++i) g[i] = B[i];
  NTT(f, lim, 1);
  NTT(g, lim, 1);
  for (int i = 0; i < lim; ++i) f[i] = (ll)f[i] * g[i] % mod;
  NTT(f, lim, -1);
  poly C;
  C.resize(len);
  for (int i = 0; i < len; ++i) C[i] = f[i];
  return C;
}
poly plus(poly A, poly B) {
  poly C;
  C.resize(std::max(A.size(), B.size()));
  for (int i = 0; i < A.size(); ++i) C[i] = dec(C[i] + A[i]);
  for (int i = 0; i < B.size(); ++i) C[i] = dec(C[i] + B[i]);
  return C;
}
std::pair<std::vector<int>, std::vector<int> > solve(std::vector<poly> v) {
  if (v.empty()) return {{0}, {1}};
  if (v.size() == 1) return {v[0], v[0]};
  int len = v.size();
  int suf = len / 2;
  std::vector<poly> v2;
  for (int i = 1; i <= suf; ++i) {
    auto x = v.back();
    v.pop_back();
    v2.push_back(x);
  }
  std::reverse(v2.begin(), v2.end());
  auto A = solve(v), B = solve(v2);
  poly P = mul(A.second, B.second);
  poly Q = plus(mul(B.first, A.second), A.first);
  return {Q, P};
}
void HLD(int u, int f) {
  size[u] = 1;
  for (int v : ch[u]) {
    if (v == f) continue;
    HLD(v, u);
    size[u] += size[v];
    if (size[v] > size[son[u]]) son[u] = v;
  }
  if (f) ch[u].erase(std::find(ch[u].begin(), ch[u].end(), f));
}
void print(poly p) {
  for (int x : p) printf("%d ", x);
  puts("");
}
std::vector<int> dfs(int u) {
  int p = u, idx = 0;
  std::vector<std::vector<int> > array;
  while (p) {
    std::vector<int> F = {1};
    for (int v : ch[p]) {
      if (v != son[p]) {
        F = dfs(v);
      }
    }
    F.insert(F.begin(), 0);
    array.push_back(F);
    p = son[p];
  }
  std::vector<int> ans = solve(array).first;
  assert(ans[0] == 0);
  ans[0]++;
  return ans;
}
int main() {
  scanf("%d%lld", &n, &x);
  fac[0] = 1;
  for (int i = 1; i <= n; ++i) fac[i] = (ll)fac[i - 1] * i % mod;
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    ch[u].push_back(v);
    ch[v].push_back(u);
  }
  HLD(1, 0);
  std::vector<int> P = dfs(1);
  assert(P.size() == n + 1);
  int coef = 1;
  int s = x % mod, ans = 0;
  for (int i = 1; i <= n; ++i) {
    ans = (ans + (ll)coef * qpow(fac[i - 1], mod - 2) % mod * P[i] % mod) % mod;
    s = (s + 1) % mod;
    coef = (ll)coef * s % mod;
  }
  printf("%d", ans);
  return 0;
}
