#include <bits/stdc++.h>
using namespace std;
const int N = 100005, maxn = 1 << 18 | 3, P = 998244353;
int fexp(int a, int b) {
  long long x = 1, o = a;
  for (; b; b >>= 1, o = o * o % P)
    if (b & 1) x = x * o % P;
  return x;
}
namespace fft {
int L, sz, rev[maxn], w[maxn];
void prepare() {
  L = 1 << (sz = 18);
  for (int i = 0; i < L; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (sz - 1));
  int wn = fexp(3, (P - 1) / L);
  w[L / 2] = 1;
  for (int i = L / 2 + 1; i < L; i++) w[i] = (long long)w[i - 1] * wn % P;
  for (int i = L / 2 - 1; i; i--) w[i] = w[i << 1];
}
void dft(int n, int *a, int c) {
  static unsigned long long _[maxn];
  for (int i = 0, sft = sz - __builtin_ctz(n); i < n; i++)
    _[rev[i] >> sft] = a[i];
  for (int l = 1; l < n; l <<= 1)
    for (int i = 0; i < n; i += l << 1)
      for (int j = 0; j < l; j++) {
        int x = _[i + j + l] * w[j + l] % P;
        _[i + j + l] = _[i + j] + P - x;
        _[i + j] += x;
      }
  for (int i = 0, x = fexp(n, P - 2); i < n; i++)
    a[i] = _[i] % P * (c ? x : 1) % P;
  if (c) std::reverse(a + 1, a + n);
}
}  // namespace fft
int n, ans, sz[N], fa[N], son[N], top[N];
long long S;
vector<int> G[N];
void dfs(int u) {
  sz[u] = 1;
  for (auto &v : G[u])
    if (v ^ fa[u]) {
      fa[v] = u;
      dfs(v);
      sz[u] += sz[v];
      if (sz[v] > sz[son[u]]) son[u] = v;
    }
}
void pull(int u, int Top) {
  top[u] = Top;
  if (son[u]) pull(son[u], Top);
  for (auto &v : G[u])
    if (v != fa[u] && v != son[u]) pull(v, v);
}
vector<int> tr, g[N], f[N];
vector<int> operator+(vector<int> a, vector<int> b) {
  a.resize(max(((int)(a.size())), ((int)(b.size()))));
  for (int i = 0; i < ((int)(a.size())); ++i) a[i] = (a[i] + b[i]) % P;
  return a;
}
vector<int> operator*(vector<int> a, vector<int> b) {
  int l = 1;
  for (; l <= ((int)(a.size())) + ((int)(b.size())) - 2; l <<= 1)
    ;
  static int f[maxn], g[maxn];
  memset(f, 0, l << 2);
  memset(g, 0, l << 2);
  copy(a.begin(), a.end(), f);
  copy(b.begin(), b.end(), g);
  fft::dft(l, f, 0);
  fft::dft(l, g, 0);
  for (int i = 0; i < l; i++) f[i] = 1LL * f[i] * g[i] % P;
  fft::dft(l, f, 1);
  return vector<int>(f, f + ((int)(a.size())) + ((int)(b.size())) - 1);
}
vector<int> fuck(int l, int r) {
  if (l > r) return vector<int>{1};
  if (l == r) {
    vector<int> t = f[tr[l]];
    ++t[0];
    return t;
  }
  int mid = (l + r) >> 1;
  return fuck(l, mid) * fuck(mid + 1, r);
}
pair<vector<int>, vector<int> > oooe(int l, int r) {
  if (l == r) return make_pair(g[tr[l]], g[tr[l]]);
  int mid = (l + r) >> 1;
  auto pl = oooe(l, mid), pr = oooe(mid + 1, r);
  return make_pair(pl.first + pl.second * pr.first, pl.second * pr.second);
}
void solve(int u) {
  for (auto &v : G[u])
    if (v != fa[u] && v != son[u]) solve(v);
  tr.clear();
  for (auto &v : G[u])
    if (v != fa[u] && v != son[u]) tr.push_back(v);
  g[u] = fuck(0, tr.size() - 1);
  g[u].resize(((int)(g[u].size())) + 1);
  for (int i = ((int)(g[u].size())) - 1; i; i--) g[u][i] = g[u][i - 1];
  g[u][0] = 0;
  if (son[u]) solve(son[u]);
  if (top[u] == u) {
    tr.clear();
    for (int j = u; j; j = son[j]) tr.push_back(j);
    f[u] = oooe(0, tr.size() - 1).first;
  }
}
int main() {
  fft::prepare();
  scanf("%d%lld", &n, &S);
  for (int i = 1, x, y; i < n; i++) {
    scanf("%d%d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
  dfs(1);
  pull(1, 1);
  solve(1);
  S %= P;
  int t = 1;
  f[1].resize(n + 1);
  for (int i = 1; i <= n; i++) {
    ans = (ans + (long long)f[1][i] * t) % P;
    t = (long long)t * (S + i) % P;
    t = (long long)t * fexp(i, P - 2) % P;
  }
  printf("%d", ans);
  return 0;
}
