#include <bits/stdc++.h>
using namespace std;
const int mo = 998244353;
long long ksm(long long x, long long y) {
  long long s = 1;
  for (; y; y /= 2, x = x * x % mo)
    if (y & 1) s = s * x % mo;
  return s;
}
namespace ntt {
const int nm = 1 << 18;
int r[nm];
long long w[nm];
void build() {
  for (int i = 1; i < nm; i *= 2) {
    w[i] = 1;
    long long v = ksm(3, (mo - 1) / 2 / i);
    for (int j = 1, _b = i; j < _b; j++) w[i + j] = w[i + j - 1] * v % mo;
  }
}
long long a[nm], b[nm];
void dft(long long *a, int n, int f) {
  for (int i = 0, _b = n; i < _b; i++) {
    r[i] = r[i / 2] / 2 + (i & 1) * (n / 2);
    if (i < r[i]) swap(a[i], a[r[i]]);
  }
  long long b;
  for (int i = 1; i < n; i *= 2)
    for (int j = 0; j < n; j += 2 * i)
      for (int k = 0, _b = i; k < _b; k++)
        b = a[i + j + k] * w[i + k], a[i + j + k] = (a[j + k] - b) % mo,
        a[j + k] = (a[j + k] + b) % mo;
  if (f == -1) {
    reverse(a + 1, a + n);
    b = ksm(n, mo - 2);
    for (int i = 0, _b = n; i < _b; i++) a[i] = (a[i] + mo) * b % mo;
  }
}
vector<long long> operator*(vector<long long> p, vector<long long> q) {
  int n0 = p.size() + q.size() - 1, n = 1;
  if (n0 < 512) {
    vector<long long> z;
    z.clear();
    z.resize(n0);
    for (int i = 0, _b = p.size(); i < _b; i++)
      for (int j = 0, _b = q.size(); j < _b; j++)
        z[i + j] = (z[i + j] + p[i] * q[j]) % mo;
    return z;
  }
  while (n < n0) n *= 2;
  for (int i = 0, _b = n; i < _b; i++) a[i] = b[i] = 0;
  for (int i = 0, _b = p.size(); i < _b; i++) a[i] = p[i];
  for (int i = 0, _b = q.size(); i < _b; i++) b[i] = q[i];
  dft(a, n, 1);
  dft(b, n, 1);
  for (int i = 0, _b = n; i < _b; i++) a[i] = a[i] * b[i] % mo;
  dft(a, n, -1);
  p.resize(n0);
  for (int i = 0, _b = n0; i < _b; i++) p[i] = a[i];
  return p;
}
}  // namespace ntt
using ntt ::operator*;
vector<long long> operator+(vector<long long> p, vector<long long> q) {
  if (p.size() < q.size()) p.resize(q.size());
  for (int i = 0, _b = q.size(); i < _b; i++) p[i] = (p[i] + q[i]) % mo;
  return p;
}
const int N = 1e5 + 5;
int n, x, y;
long long s;
int fa[N];
vector<int> e[N];
int top[N], son[N], siz[N];
void dg(int x) {
  siz[x] = 1;
  for (int _y = 0, _b = e[x].size(); _y < _b; _y++) {
    int y = e[x][_y];
    if (y == fa[x]) continue;
    fa[y] = x;
    dg(y);
    siz[x] += siz[y];
    if (siz[y] > siz[son[x]]) son[x] = y;
  }
}
void dfs(int x) {
  if (!top[x]) top[x] = x;
  if (son[x]) top[son[x]] = top[x], dfs(son[x]);
  for (int _y = 0, _b = e[x].size(); _y < _b; _y++) {
    int y = e[x][_y];
    if (y == fa[x] || y == son[x]) continue;
    dfs(y);
  }
}
int d[N], d0;
vector<long long> f[N], g[N], h[N];
int cmpd(int x, int y) { return g[x].size() < g[y].size(); }
vector<long long> fz(int x, int y) {
  if (x == y) return g[d[x]];
  int m = x + y >> 1;
  return fz(x, m) * fz(m + 1, y);
}
vector<long long> fz2(int x, int y) {
  if (x == y) return h[d[x]];
  int m = x + y >> 1;
  return fz2(x, m) * fz2(m + 1, y);
}
vector<long long> t[N * 4][3];
void fg(int i, int x, int y) {
  if (x == y) {
    t[i][0] = t[i][1] = g[d[x]];
    t[i][2] = h[d[x]];
    return;
  }
  int m = x + y >> 1;
  fg(i + i, x, m);
  fg(i + i + 1, m + 1, y);
  t[i][0] = t[i + i][0] * t[i + i + 1][2] + t[i + i][1] * t[i + i + 1][0];
  t[i][1] = t[i + i][1] * t[i + i + 1][1];
  t[i][2] = t[i + i][2] * t[i + i + 1][2];
}
void dd(int x) {
  for (int _y = 0, _b = e[x].size(); _y < _b; _y++) {
    int y = e[x][_y];
    if (y == fa[x] || y == son[x]) continue;
    dd(y);
  }
  g[x].resize(1);
  g[x][0] = 1;
  h[x].resize(2);
  h[x][0] = 1;
  h[x][1] = -1;
  d[d0 = 1] = x;
  for (int _y = 0, _b = e[x].size(); _y < _b; _y++) {
    int y = e[x][_y];
    if (y == fa[x] || y == son[x]) continue;
    d[++d0] = y;
    g[y] = f[y] + h[y];
  }
  sort(d + 1, d + d0 + 1, cmpd);
  g[x] = fz(1, d0);
  h[x] = fz2(1, d0);
  if (son[x]) dd(son[x]);
  if (son[fa[x]] != x) {
    d0 = 0;
    for (int p = x; p; p = son[p]) d[++d0] = p;
    fg(1, 1, d0);
    f[x] = t[1][0];
    h[x] = t[1][2];
  }
}
void End() {
  static long long v[N * 2], c[N * 2], w[N * 2], xs[N];
  for (int i = 0, _b = 2 * n; i <= _b; i++) v[i] = (i - n + s) % mo;
  w[0] = v[0] ? v[0] : 1;
  for (int i = 1, _b = 2 * n; i <= _b; i++)
    w[i] = w[i - 1] * (v[i] ? v[i] : 1) % mo;
  c[0] = v[0] ? 0 : 1;
  for (int i = 1, _b = 2 * n; i <= _b; i++) c[i] = c[i - 1] + (v[i] ? 0 : 1);
  long long nf = 1;
  for (int i = 1, _b = n - 1; i <= _b; i++) nf = nf * i % mo;
  nf = ksm(nf, mo - 2);
  for (int i = 0, _b = n; i <= _b; i++) {
    int l = -i + 1, r = -i + n - 1;
    r += n, l += n;
    if (c[r] - c[l - 1] > 0) {
      xs[i] = 0;
    } else {
      xs[i] = w[r] * ksm(w[l - 1], mo - 2) % mo * nf % mo;
    }
  }
  int m = min(n, (int)f[1].size() - 1);
  long long ans = 0;
  for (int i = 0, _b = m; i <= _b; i++) ans = (ans + f[1][i] * xs[i]) % mo;
  ans = (ans % mo + mo) % mo;
  printf("%lld\n", ans);
}
int main() {
  ntt ::build();
  scanf("%d %lld", &n, &s);
  for (int i = 1, _b = n - 1; i <= _b; i++) {
    scanf("%d %d", &x, &y);
    e[x].push_back(y);
    e[y].push_back(x);
  }
  dg(1);
  dfs(1);
  dd(1);
  End();
}
