#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, M = (1 << 17) + 5, mo = 998244353;
int n, x, y, ans;
long long s;
int hv[N], fa[N], ld[N], d[N], ds;
vector<int> e[N];
vector<int> a[N], b[N];
int ksm(int x, int y) {
  int t = 1;
  for (; y; y >>= 1, x = (long long)x * x % mo)
    if (y & 1) t = (long long)t * x % mo;
  return t;
}
namespace NTT {
int w[M], h[M], Q;
void print(vector<int> &a) {
  for (int i = 0, _e = a.size(); i < _e; ++i) printf("%d ", (a[i] + mo) % mo);
  printf("\n");
}
void init(int n) {
  for (Q = 1; Q <= n; Q <<= 1)
    ;
  for (int i = 1; i < Q; i <<= 1) {
    int g = ksm(3, (mo - 1) / (i + i));
    w[i] = 1;
    for (int j = 1, _e = i; j < _e; ++j)
      w[i + j] = (long long)w[i + j - 1] * g % mo;
  }
}
void pre(int n) {
  for (Q = 1; Q <= n; Q <<= 1)
    ;
  for (int i = 1, _e = Q; i < _e; ++i)
    h[i] = (h[i >> 1] >> 1) | (i & 1 ? Q >> 1 : 0);
}
void dft(vector<int> &a, int sgn) {
  a.resize(Q);
  for (int i = 1, _e = Q; i < _e; ++i)
    if (h[i] > i) swap(a[i], a[h[i]]);
  long long A;
  for (int i = 1; i < Q; i <<= 1)
    for (int j = 0; j < Q; j += i * 2)
      for (int k = 0, _e = i; k < _e; ++k)
        A = (long long)w[i + k] * a[i + j + k],
        a[i + j + k] = (-A + a[j + k]) % mo, a[j + k] = (A + a[j + k]) % mo;
  if (sgn) {
    reverse(a.begin() + 1, a.end());
    int y = ksm(Q, mo - 2);
    for (int i = 0, _e = Q; i < _e; ++i) a[i] = (long long)a[i] * y % mo;
  }
}
vector<int> operator*(const vector<int> &a, const vector<int> &b) {
  static vector<int> ntta, nttb;
  ntta = a;
  nttb = b;
  int n = (int)ntta.size() + nttb.size() - 2;
  pre(n);
  dft(ntta, 0);
  dft(nttb, 0);
  for (int i = 0, _e = Q; i < _e; ++i)
    ntta[i] = (long long)ntta[i] * nttb[i] % mo;
  dft(ntta, 1);
  ntta.resize(n + 1);
  return ntta;
}
vector<int> operator+(const vector<int> &a, const vector<int> &b) {
  static vector<int> c;
  c = a;
  c.resize(max(a.size(), b.size()));
  for (int i = 0, _e = b.size(); i < _e; ++i) c[i] = (c[i] + b[i]) % mo;
  return c;
}
}  // namespace NTT
using namespace NTT;
void dfs(int x) {
  ld[x] = 1;
  for (int i : e[x])
    if (i != fa[x]) {
      fa[i] = x;
      dfs(i);
      ld[x] += ld[i];
      if (ld[i] > ld[hv[x]]) hv[x] = i;
    }
}
void divide(int l, int r) {
  if (l == r) return;
  int m = l + r >> 1;
  divide(l, m);
  divide(m + 1, r);
  a[d[l]] = a[d[l]] * a[d[m + 1]];
  a[d[m + 1]].clear();
}
void divide2(int l, int r) {
  if (l == r) return;
  int m = l + r >> 1;
  divide2(l, m);
  divide2(m + 1, r);
  b[d[l]] = b[d[l]] + a[d[l]] * b[d[m + 1]];
  a[d[l]] = a[d[l]] * a[d[m + 1]];
  a[d[m + 1]].clear();
  b[d[m + 1]].clear();
}
void dfs2(int x, int st) {
  ld[x] = st;
  if (!hv[x]) {
    d[ds = 1] = x;
    a[x].resize(1);
    b[x].resize(2);
    a[x][0] = 0;
    b[x][0] = b[x][1] = 1;
    for (int y = x; y != st;) {
      y = fa[y];
      d[++ds] = y;
      b[y].resize(1);
      b[y][0] = 1;
    }
    reverse(d + 1, d + ds + 1);
    divide2(1, ds);
    a[st] = b[st];
    return;
  }
  for (int i : e[x])
    if (i != fa[x] && i != hv[x]) dfs2(i, i);
  a[x].resize(2);
  a[x][1] = 1;
  d[ds = 1] = x;
  for (int i : e[x])
    if (i != fa[x] && i != hv[x]) d[++ds] = i;
  divide(1, ds);
  dfs2(hv[x], st);
}
int main() {
  scanf("%d%lld", &n, &s);
  s %= mo;
  for (int i = 2, _e = n; i <= _e; ++i)
    scanf("%d%d", &x, &y), e[x].push_back(y), e[y].push_back(x);
  init(n);
  dfs(1);
  dfs2(1, 1);
  int c = 1;
  for (int i = 1, _e = n; i <= _e; ++i) {
    ans = ((long long)c * a[1][i] + ans) % mo;
    c = (long long)c * (s + i) % mo * ksm(i, mo - 2) % mo;
  }
  printf("%d\n", (ans + mo) % mo);
}
