#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const int maxn = 100005;
const int G = 3;
struct edge {
  int to, next;
} e[maxn << 1];
int n, head[maxn], cnt, qz[maxn], siz[maxn], son[maxn], fa[maxn], top[maxn],
    dfn[maxn], tot, now[maxn], inv[maxn], ans, tail[maxn], a[maxn << 3],
    b[maxn << 3];
long long s;
vector<int> dp[maxn], vec[maxn], g[22], f[22];
int rev[maxn << 3], wn[21][maxn << 3][2];
inline int qpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1LL * res * x % mod;
    x = 1LL * x * x % mod;
    y >>= 1;
  }
  return res;
}
inline void add(int &x, int y) { x + y >= mod ? x = x + y - mod : x += y; }
inline int sub(int x, int y) { return x - y < 0 ? x - y + mod : x - y; }
inline void get_rev(int bit) {
  for (int i = 0; i < (1 << bit); ++i) {
    rev[i] = ((rev[i >> 1] >> 1) | ((i & 1) << (bit - 1)));
  }
}
void ntt(int *a, int n, int dft) {
  for (register int i = 0; i < n; ++i) {
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  }
  for (int step = 1, p = 0; step < n; step <<= 1, ++p) {
    for (int i = 0; i < n; i += (step << 1)) {
      for (int j = i; j < i + step; ++j) {
        int x = a[j];
        int y = 1LL * a[j + step] * wn[p][j][dft] % mod;
        add(a[j], y);
        a[j + step] = sub(x, y);
      }
    }
  }
  if (!dft) {
    int inv = qpow(n, mod - 2);
    for (int i = 0; i < n; ++i) {
      a[i] = 1LL * a[i] * inv % mod;
    }
  }
}
void add_edge(int x, int y) {
  e[cnt].to = y;
  e[cnt].next = head[x];
  head[x] = cnt++;
}
void dfs1(int u, int pre) {
  siz[u] = 1;
  fa[u] = pre;
  for (int i = head[u]; i; i = e[i].next) {
    if (e[i].to == pre) continue;
    dfs1(e[i].to, u);
    siz[u] += siz[e[i].to];
    if (son[u] == -1 || siz[son[u]] < siz[e[i].to]) son[u] = e[i].to;
  }
}
void dfs2(int u, int t) {
  dfn[u] = ++tot;
  top[u] = t;
  if (son[u] == -1) {
    tail[u] = u;
    return;
  }
  dfs2(son[u], t);
  tail[u] = tail[son[u]];
  for (int i = head[u]; i; i = e[i].next) {
    if (e[i].to == fa[u] || e[i].to == son[u]) continue;
    dfs2(e[i].to, e[i].to);
  }
}
void bb(int l, int r, int d, int u) {
  if (l == r) {
    g[d] = dp[vec[u][l]];
    if (l)
      g[d][0] = 1;
    else
      g[d][0] = 0;
    return;
  }
  int mid = (l + r) >> 1;
  bb(l, mid, d + 1, u);
  g[d] = g[d + 1];
  g[d + 1].clear();
  bb(mid + 1, r, d + 1, u);
  int S = 1, bit = 0;
  int len = g[d].size() + g[d + 1].size() - 2;
  while (S <= len) S <<= 1, bit++;
  get_rev(bit);
  for (int i = 0; i < g[d].size(); ++i) a[i] = g[d][i];
  for (int i = 0; i < g[d + 1].size(); ++i) b[i] = g[d + 1][i];
  ntt(a, S, 1);
  ntt(b, S, 1);
  for (int i = 0; i < S; ++i) a[i] = 1LL * a[i] * b[i] % mod;
  ntt(a, S, 0);
  g[d].clear();
  g[d + 1].clear();
  for (int i = 0; i <= len; ++i) g[d].push_back(a[i]);
  for (int i = 0; i < S; ++i) a[i] = b[i] = 0;
}
void hb(int l, int r, int d, int u) {
  if (l == r) {
    g[d] = dp[vec[u][l]];
    f[d] = g[d];
    return;
  }
  int mid = (l + r) >> 1;
  hb(l, mid, d + 1, u);
  g[d] = g[d + 1];
  g[d + 1].clear();
  f[d] = f[d + 1];
  f[d + 1].clear();
  hb(mid + 1, r, d + 1, u);
  int S = 1, bit = 0;
  int len = g[d].size() + g[d + 1].size() - 2;
  while (S <= len) S <<= 1, bit++;
  get_rev(bit);
  for (int i = 0; i < f[d].size(); ++i) a[i] = f[d][i];
  for (int i = 0; i < g[d + 1].size(); ++i) b[i] = g[d + 1][i];
  ntt(a, S, 1);
  ntt(b, S, 1);
  for (int i = 0; i < S; ++i) a[i] = 1LL * a[i] * b[i] % mod;
  ntt(a, S, 0);
  for (int i = 0; i < g[d].size(); ++i) add(a[i], g[d][i]);
  g[d].clear();
  g[d + 1].clear();
  for (int i = 0; i <= len; ++i) g[d].push_back(a[i]);
  for (int i = 0; i < S; ++i) a[i] = b[i] = 0;
  for (int i = 0; i < f[d].size(); ++i) a[i] = f[d][i];
  for (int i = 0; i < f[d + 1].size(); ++i) b[i] = f[d + 1][i];
  ntt(a, S, 1);
  ntt(b, S, 1);
  for (int i = 0; i < S; ++i) a[i] = 1LL * a[i] * b[i] % mod;
  ntt(a, S, 0);
  f[d].clear();
  f[d + 1].clear();
  for (int i = 0; i <= len; ++i) f[d].push_back(a[i]);
  for (int i = 0; i < S; ++i) a[i] = b[i] = 0;
}
void dfs3(int u) {
  dp[u].push_back(0);
  dp[u].push_back(1);
  vec[u].push_back(u);
  for (int i = head[u]; i; i = e[i].next) {
    if (e[i].to == fa[u]) continue;
    dfs3(e[i].to);
    if (e[i].to != son[u]) vec[u].push_back(e[i].to);
  }
  if (vec[u].size() > 1) {
    bb(0, vec[u].size() - 1, 0, u);
    for (int i = 0; i < vec[u].size(); ++i) dp[vec[u][i]].clear();
    dp[u] = g[0];
    g[0].clear();
    dp[u][0] = 0;
  }
  vec[u].clear();
  if (u == top[u]) {
    int x = u;
    while (x != -1) vec[u].push_back(x), x = son[x];
    hb(0, vec[u].size() - 1, 0, u);
    for (int i = 0; i < vec[u].size(); ++i) dp[vec[u][i]].clear();
    dp[u] = g[0];
    g[0].clear();
    f[0].clear();
    dp[u][0] = 0;
    vec[u].clear();
  }
}
int main() {
  for (int step = 1, p = 0; step < (1 << 19); step <<= 1, ++p) {
    int w = qpow(G, (mod - 1) / (step << 1));
    int w2 = qpow(w, mod - 2);
    for (int i = 0; i < (1 << 19); i += (step << 1)) {
      int wnk = 1, wnk2 = 1;
      for (int j = i; j < i + step; ++j) {
        wn[p][j][1] = wnk;
        wn[p][j][0] = wnk2;
        wnk = 1LL * wnk * w % mod;
        wnk2 = 1LL * wnk2 * w2 % mod;
      }
    }
  }
  cnt = 1;
  memset(son, -1, sizeof(son));
  scanf("%d%lld", &n, &s);
  s++;
  s %= mod;
  for (int i = 1; i < n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    add_edge(x, y);
    add_edge(y, x);
  }
  tot = 0;
  dfs1(1, 0);
  dfs2(1, 1);
  dfs3(1);
  int now = 1;
  inv[1] = 1;
  ans = 0;
  for (int i = 1; i <= n; ++i) {
    add(ans, 1LL * now * dp[1][i] % mod);
    inv[i + 1] = 1LL * inv[mod % (i + 1)] * (mod - mod / (i + 1)) % mod;
    now = 1LL * now * (s + i - 1) % mod * inv[i] % mod;
  }
  cout << ans << endl;
}
