#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int Mod = 998244353;
int add(int a, int b) { return a + b >= Mod ? a + b - Mod : a + b; }
int mul(int a, int b) { return 1ll * a * b % Mod; }
int ksm(int a, int b) {
  int ans = 1;
  for (; b; b >>= 1, a = mul(a, a))
    if (b & 1) ans = mul(ans, a);
  return ans;
}
void Mul(int &a, int b) { a = mul(a, b); }
void Add(int &a, int b) { a = add(a, b); }
int dec(int a, int b) { return a - b < 0 ? a - b + Mod : a - b; }
vector<int> a[N];
int inv[N];
void Cout(vector<int> tt) {
  for (int i = 0; i < tt.size(); i++) cout << tt[i] << " ";
  cout << '\n';
}
namespace Poly {
int bit, up, rev[N << 2];
void init(int deg) {
  up = 1;
  bit = 0;
  while (up <= deg) up <<= 1, ++bit;
  for (int i = 0; i < up; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << bit - 1);
}
const int C = 19;
vector<int> w[C + 1];
void prework() {
  for (int i = 1; i <= C; i++) w[i].resize(1 << i - 1);
  int wn = ksm(3, (Mod - 1) / (1 << C));
  w[C][0] = 1;
  for (int i = 1; i < (1 << C - 1); i++) w[C][i] = mul(w[C][i - 1], wn);
  for (int i = C - 1; i; i--)
    for (int j = 0; j < (1 << i - 1); j++) w[i][j] = w[i + 1][j << 1];
}
void NTT(vector<int> &a, int typ) {
  for (int i = 0; i < up; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int l = 1, i = 1; i < up; i <<= 1, ++l)
    for (int j = 0; j < up; j += (i << 1))
      for (int k = 0; k < i; k++) {
        int x = a[k + j], y = mul(w[l][k], a[k + j + i]);
        a[k + j] = add(x, y);
        a[k + j + i] = dec(x, y);
      }
  if (typ == -1) {
    reverse(a.begin() + 1, a.end());
    for (int i = 0, inv = ksm(up, Mod - 2); i < up; i++) a[i] = mul(a[i], inv);
  }
}
vector<int> operator*(vector<int> a, vector<int> b) {
  int deg = a.size() + b.size() - 1;
  init(deg);
  a.resize(up);
  b.resize(up);
  NTT(a, 1);
  NTT(b, 1);
  for (int i = 0; i < up; i++) Mul(a[i], b[i]);
  NTT(a, -1);
  a.resize(deg);
  return a;
}
vector<int> operator+(vector<int> a, vector<int> b) {
  int deg = max(a.size(), b.size());
  a.resize(deg);
  b.resize(deg);
  for (int i = 0; i < deg; i++) a[i] = add(a[i], b[i]);
  return a;
}
void Solve(int l, int r, vector<int> &F, vector<int> &G) {
  if (l == r) {
    F = G = a[l];
    return;
  }
  int mid = (l + r) >> 1;
  vector<int> Fl, Fr, Gl, Gr;
  Solve(l, mid, Fl, Gl);
  Solve(mid + 1, r, Fr, Gr);
  F = Fl * Fr;
  G = Gl + Fl * Gr;
}
}  // namespace Poly
int n;
long long K;
vector<int> v[N];
int sz[N], son[N], fa[N];
void pre_dfs(int u, int f) {
  sz[u] = 1;
  for (int i = 0; i < v[u].size(); i++) {
    int t = v[u][i];
    if (t == f) continue;
    fa[t] = u;
    pre_dfs(t, u);
    sz[u] += sz[t];
    if (sz[t] > sz[son[u]]) son[u] = t;
  }
}
vector<int> f[N];
vector<int> calc(int u) {
  for (int t = u; t; t = son[t]) {
    for (int i = 0; i < v[t].size(); i++)
      if ((v[t][i] ^ fa[t]) && (v[t][i] ^ son[t])) f[t] = calc(v[t][i]);
    if (f[t].empty()) f[t].push_back(0);
    ++f[t][0];
    f[t].insert(f[t].begin(), 0);
  }
  int k = 0;
  for (int t = u; t; t = son[t]) swap(a[++k], f[t]);
  vector<int> F, G;
  Poly::Solve(1, k, F, G);
  return G;
}
int main() {
  scanf("%d%lld", &n, &K);
  Poly::prework();
  inv[0] = inv[1] = 1;
  for (int i = 2; i <= n; i++) inv[i] = mul(Mod - Mod / i, inv[Mod % i]);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  pre_dfs(1, 0);
  vector<int> g = calc(1);
  int Binom = 1, ans = 0;
  for (int i = 1; i < g.size(); i++) {
    Add(ans, mul(Binom, g[i]));
    Mul(Binom, mul((K + i) % Mod, inv[i]));
  }
  cout << ans;
  return 0;
}
