#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353, _G = 3, Maxn = 135000;
int read() {
  int X = 0;
  char ch = 0;
  while (ch < 48 || ch > 57) ch = getchar();
  while (ch >= 48 && ch <= 57) X = X * 10 + (ch ^ 48), ch = getchar();
  return X;
}
long long powM(long long a, int t = mod - 2) {
  long long ret = 1;
  while (t) {
    if (t & 1) ret = ret * a % mod;
    a = a * a % mod;
    t >>= 1;
  }
  return ret;
}
const int invG = powM(_G);
int tr[Maxn << 1], tf;
void tpre(int n) {
  if (tf == n) return;
  tf = n;
  for (int i = 1; i < n; i++)
    tr[i] = (tr[i >> 1] >> 1) | ((i & 1) ? (n >> 1) : 0);
}
void NTT(int *g, bool op, int n) {
  static unsigned long long f[Maxn << 1], w[Maxn] = {1};
  tpre(n);
  for (int i = 0; i < n; i++) f[i] = (((long long)mod << 5) + g[tr[i]]) % mod;
  for (int l = 1; l < n; l <<= 1) {
    unsigned long long tG = powM(op == 1 ? _G : invG, (mod - 1) / (l + l)), sav;
    for (int i = 1; i < l; i++) w[i] = w[i - 1] * tG % mod;
    for (int p = 0; p < n; p += (l + l))
      for (int k = 0; k < l; k++) {
        sav = w[k] * f[p | l | k] % mod;
        f[p | l | k] = f[p | k] + mod - sav;
        f[p | k] = f[p | k] + sav;
      }
    if (l == (1 << 10))
      for (int i = 0; i < n; i++) f[i] %= mod;
  }
  if (op == 0) {
    long long invn = powM(n);
    for (int i = 0; i < n; i++) g[i] = f[i] % mod * invn % mod;
  } else
    for (int i = 0; i < n; i++) g[i] = f[i] % mod;
}
vector<int> g[Maxn], sav[Maxn];
struct Node {
  int c, l, r, f, tf;
} b[Maxn];
void pfs(int u) {
  b[u].c = 1;
  for (int i = 0, v; i < g[u].size(); i++)
    if (!b[v = g[u][i]].c) {
      b[v].f = u;
      pfs(v);
      b[u].c += b[v].c;
      if (b[v].c > b[b[u].r].c) {
        b[u].l = b[u].r;
        b[u].r = v;
      } else
        b[u].l = v;
    }
}
void times(int *f, int *g, int n1, int n2) {
  int m = n1 + n2 - 1;
  if (min(n1, n2) <= 16) {
    static unsigned long long s[Maxn];
    for (int i = 1; i < m; i++) s[i] = 0;
    for (int i = 1; i < n1; i++)
      for (int j = 1; j < n2; j++) s[i + j] += 1ull * f[i] * g[j];
    for (int i = 0; i < m; i++) f[i] = s[i] % mod;
  } else {
    static int s[Maxn];
    memset(s, 0, sizeof(int) * (m));
    for (int i = 1; i < n1; i++)
      for (int j = 1; j < n2; j++)
        s[i + j] = (s[i + j] + 1ll * f[i] * g[j]) % mod;
    memcpy(f, s, sizeof(int) * (m));
  }
}
struct Data {
  int *w, *u, c;
} s[Maxn];
int st[Maxn], tn, _w[Maxn << 1], _u[Maxn << 1], *tw, *tu, f1[Maxn << 1],
    f2[Maxn << 1], f3[Maxn << 1];
Data merge(Data A, Data B) {
  int m = A.c + B.c - 1;
  memcpy(f1, A.u, sizeof(int) * (A.c));
  memcpy(f2, B.u, sizeof(int) * (B.c));
  if (1ll * A.c * B.c <= (A.c + B.c) * 26) {
    times(f1, f2, A.c, B.c);
    memcpy(f3, A.w, sizeof(int) * (A.c));
    times(f3, f2, A.c, B.c);
  } else {
    int n = 1;
    while (n < m) n <<= 1;
    memset(f1 + A.c, 0, sizeof(int) * (n - A.c));
    memset(f2 + B.c, 0, sizeof(int) * (n - B.c));
    NTT(f1, 1, n);
    NTT(f2, 1, n);
    for (int i = 0; i < n; i++) f1[i] = 1ll * f1[i] * f2[i] % mod;
    NTT(f1, 0, n);
    memcpy(f3, A.w, sizeof(int) * (A.c));
    memset(f3 + A.c, 0, sizeof(int) * (n - A.c));
    NTT(f3, 1, n);
    for (int i = 0; i < n; i++) f3[i] = 1ll * f3[i] * f2[i] % mod;
    NTT(f3, 0, n);
  }
  for (int i = 0; i < B.c; i++) f3[i] = (f3[i] + B.w[i]) % mod;
  memcpy(A.u, f1, sizeof(int) * (A.c = m));
  memcpy(A.w, f3, sizeof(int) * (m));
  return A;
}
void dfs(int u, int tf) {
  if (!b[u].r) {
    int p = u;
    tn = 0;
    for (int p = u; p != tf; p = b[p].f) st[++tn] = p;
    st[++tn] = tf;
    tu = _u;
    tw = _w;
    for (int i = 1, p; i <= tn; i++) {
      s[i].u = tu;
      s[i].w = tw;
      if (!(p = b[st[i]].l)) {
        s[i].c = 2;
        s[i].w[1] = s[i].u[1] = 1;
      } else {
        s[i].c = sav[p].size() + 1;
        for (int j = 0; j < sav[p].size(); j++)
          s[i].u[j + 1] = s[i].w[j + 1] = sav[p][j];
        sav[p].clear();
      }
      s[i].w[0] = s[i].u[0] = 0;
      tu += s[i].c;
      tw += s[i].c;
    }
    while (tn > 1) {
      for (int i = 2; i <= tn; i += 2) s[i >> 1] = merge(s[i - 1], s[i]);
      if (tn & 1) s[(tn + 1) >> 1] = s[tn];
      tn = (tn + 1) >> 1;
    }
    sav[tf].resize(s[1].c);
    for (int i = 1; i < s[1].c; i++) sav[tf][i] = s[1].w[i];
    sav[tf][0] = 1;
    return;
  }
  if (b[u].l) dfs(b[u].l, b[u].l);
  dfs(b[u].r, tf);
}
int n;
long long x;
int main() {
  n = read();
  scanf("%lld", &x);
  x %= mod;
  for (int i = 1, fr, to; i < n; i++) {
    fr = read();
    to = read();
    g[fr].push_back(to);
    g[to].push_back(fr);
  }
  pfs(1);
  dfs(1, 1);
  long long C = 1, ans = 0;
  for (int i = 1; i <= n; i++) {
    ans = (ans + C * sav[1][i]) % mod;
    C = C * (x + i) % mod * powM(i) % mod;
  }
  printf("%lld", ans);
  return 0;
}
