#include <bits/stdc++.h>
template <class temp>
inline temp F() {
  temp x = 0;
  bool bo = 0;
  char ch = getchar();
  while (ch != '-' && !std::isdigit(ch)) ch = getchar();
  (ch == '-') && (bo = 1, ch = getchar());
  while (std::isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ '0'), ch = getchar();
  bo && (x = -x);
  return x;
}
class Graph {
 public:
  struct Edge {
    int to;
    Edge *nxt;
  };
  typedef Edge *Node;
  Node Nul, *Head;
  void Resize(int siz) {
    Head = new Node[siz + 1];
    for (register int i = 0; i <= siz; ++i) Head[i] = Nul;
  }
  void Add(int f, int t) {
    Node x = new Edge();
    x->to = t;
    x->nxt = Head[f], Head[f] = x;
  }
} T;
const int mod = 998244353;
inline int Add(int x, int y) { return x + y >= mod ? x + y - mod : x + y; }
inline int Sub(int x, int y) { return x - y < 0 ? x - y + mod : x - y; }
inline int Mul(int x, int y) { return 1ll * x * y % mod; }
inline int Qpow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = Mul(ret, x);
    x = Mul(x, x), y >>= 1;
  }
  return ret;
}
int P[400001];
int G[31][2];
void Init() {
  G[23][0] = Qpow(3, 119);
  G[23][1] = Qpow(G[23][0], mod - 2);
  for (register int i = 22; i; --i) {
    G[i][0] = 1ll * G[i + 1][0] * G[i + 1][0] % mod;
    G[i][1] = 1ll * G[i + 1][1] * G[i + 1][1] % mod;
  }
}
void Calc(int LG) {
  for (register int i = 0; i < (1 << LG); ++i)
    P[i] = (P[i >> 1] >> 1) | ((i & 1) << (LG - 1));
}
void NTT(std::vector<int> &x, int lim, bool fl) {
  for (register int i = 0; i < lim; ++i)
    if (i < P[i]) std::swap(x[i], x[P[i]]);
  for (register int mid = 1, o = 1; mid < lim; mid <<= 1, ++o) {
    int Wn = G[o][fl];
    for (register int t = mid << 1, i = 0; i < lim; i += t) {
      for (register int j = 0, w = 1; j < mid; w = 1ll * w * Wn % mod, ++j) {
        int t1 = x[i + j], t2 = 1ll * x[i + j + mid] * w % mod;
        x[i + j] = Add(t1, t2);
        x[i + j + mid] = Sub(t1, t2);
      }
    }
  }
  if (fl == 1) {
    int invlim = Qpow(lim, mod - 2);
    for (register int i = 0; i < lim; ++i) x[i] = Mul(x[i], invlim);
  }
}
std::vector<int> a[100001], f[100001], t;
std::vector<int> operator*(std::vector<int> a, std::vector<int> b) {
  int o = a.size() + b.size() - 1, lim = 1, lg = 0;
  while (lim <= o) lim <<= 1, ++lg;
  a.resize(lim), b.resize(lim);
  Calc(lg);
  NTT(a, lim, 0), NTT(b, lim, 0);
  for (register int i = 0; i < lim; ++i) a[i] = Mul(a[i], b[i]);
  NTT(a, lim, 1);
  a.resize(o);
  return a;
}
std::vector<int> operator+(std::vector<int> a, std::vector<int> b) {
  int o = std::max(a.size(), b.size());
  a.resize(o), b.resize(o);
  for (register int i = 0; i < o; ++i) a[i] = Add(a[i], b[i]);
  return a;
}
void Solve(int lt, int rt, std::vector<int> &X, std::vector<int> &Y) {
  if (lt == rt) {
    X = Y = a[lt];
    return;
  }
  int mid = (lt + rt) >> 1;
  std::vector<int> Xl, Xr, Yl, Yr;
  Solve(lt, mid, Xl, Yl);
  Solve(mid + 1, rt, Xr, Yr);
  X = Xl * Xr;
  Y = (Yl + Xl * Yr);
}
int fa[100001];
int siz[100001];
int son[100001];
void PreDFS(int x) {
  siz[x] = 1;
  for (Graph::Node j = T.Head[x]; j != T.Nul; j = j->nxt)
    if (j->to != fa[x]) {
      fa[j->to] = x;
      PreDFS(j->to);
      siz[x] += siz[j->to];
      if (siz[j->to] > siz[son[x]]) son[x] = j->to;
    }
}
std::vector<int> SucDFS(int x) {
  for (register int y = x; y; y = son[y]) {
    for (Graph::Node j = T.Head[y]; j != T.Nul; j = j->nxt)
      if (j->to != fa[y] && j->to != son[y]) f[y] = SucDFS(j->to);
    if (f[y].empty()) f[y].push_back(0);
    ++f[y][0];
    f[y].insert(f[y].begin(), 0);
  }
  int tot = 0;
  for (register int y = x; y; y = son[y]) std::swap(a[++tot], f[y]);
  std::vector<int> X, Y;
  Solve(1, tot, X, Y);
  return Y;
}
int inv[100001];
int main() {
  Init();
  int n = F<int>();
  long long x = F<long long>();
  inv[1] = 1;
  for (register int i = 2; i <= n; ++i)
    inv[i] = Mul(mod - mod / i, inv[mod % i]);
  T.Resize(n);
  int u, v;
  for (register int i = 1; i < n; ++i) {
    u = F<int>(), v = F<int>();
    T.Add(u, v), T.Add(v, u);
  }
  PreDFS(1);
  t = SucDFS(1);
  int C = 1, ans = 0;
  for (register int i = 1; i < t.size(); ++i) {
    ans = Add(ans, Mul(C, t[i]));
    C = Mul(C, Mul((x + i) % mod, inv[i]));
  }
  printf("%d\n", ans);
  return 0;
}
