#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7, p = 998244353;
vector<int> vf[N], vw[N], gv[N], fv[N];
int n, k, lim, fa[N], fs[N], tp[N], rev[N], len[N], siz[N], ch[N][2];
long long kq, wn[N << 1], iwn[N << 1];
vector<int> v[N], vq[N];
inline long long read() {
  long long num = 0;
  char g = getchar();
  while (g < 48 || 57 < g) g = getchar();
  while (47 < g && g < 58)
    num = (num << 1) + (num << 3) + g - 48, g = getchar();
  return num;
}
inline long long pows(long long u, int v) {
  long long ans = 1;
  while (v > 0) {
    if (v & 1) ans = ans * u % p;
    u = u * u % p, v = v >> 1;
  }
  return ans;
}
inline void init() {
  for (int d = 1; d < 2e5; d = d << 1) {
    long long w = pows(3, (p - 1) / (d << 1)),
              e = pows(332748118, (p - 1) / (d << 1)), wf = 1, we = 1;
    for (int j = 0; j < d; j++, wf = wf * w % p, we = we * e % p)
      wn[j + d] = wf, iwn[j + d] = we;
  }
}
inline int inc(int a, int b) {
  if (a + b >= p) return a + b - p;
  return a + b;
}
inline void ntt(vector<int>& f) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) swap(f[i], f[rev[i]]);
  for (int d = 1; d < lim; d = d << 1)
    for (int i = 0, r = d << 1; i < lim; i += r) {
      for (int j = 0; j < d; j++) {
        long long a = f[i + j], b = f[i + j + d] * wn[j + d] % p;
        f[i + j] = inc(a, b), f[i + j + d] = inc(a, p - b);
      }
    }
}
inline void intt(vector<int>& f) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) swap(f[i], f[rev[i]]);
  for (int d = 1; d < lim; d = d << 1)
    for (int i = 0, r = d << 1; i < lim; i += r) {
      for (int j = 0; j < d; j++) {
        long long a = f[i + j], b = f[i + j + d] * iwn[j + d] % p;
        f[i + j] = inc(a, b), f[i + j + d] = inc(a, p - b);
      }
    }
  long long inv = pows(lim, p - 2);
  for (int i = 0; i < lim; i++) f[i] = f[i] * inv % p;
}
inline void find(int u) {
  siz[u] = 1;
  for (int i = 0; i < len[u]; i++) {
    int x = v[u][i];
    if (fa[u] == x) continue;
    fa[x] = u, find(x), siz[u] += siz[x];
    if (siz[fs[u]] < siz[x]) fs[u] = x;
  }
}
inline void search(int u) {
  if (!tp[u]) tp[u] = u;
  if (fs[u]) tp[fs[u]] = tp[u], search(fs[u]);
  for (int i = 0; i < len[u]; i++) {
    int x = v[u][i];
    if (fa[u] == x || fs[u] == x) continue;
    ch[u][1] = x, search(x);
  }
  ch[u][0] = fs[u];
}
inline void getsum(int l, int r, int t) {
  if (l == r) {
    int h = vf[vq[t][l]].size();
    gv[l].resize(h + 1), fv[l].resize(h + 1);
    for (int i = 0; i < h; i++) fv[l][i + 1] = gv[l][i + 1] = vf[vq[t][l]][i];
    return;
  }
  int d = (l + r) >> 1;
  getsum(l, d, t), getsum(d + 1, r, t);
  int la = fv[l].size(), lb = fv[d + 1].size(), lc = gv[l].size(),
      ld = gv[d + 1].size();
  lim = 1, k = 0;
  while (lim <= la + ld) lim = lim << 1, k++;
  for (int i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (k - 1));
  fv[l].resize(lim), gv[d + 1].resize(lim);
  ntt(fv[l]), ntt(gv[d + 1]);
  for (int i = 0; i < lim; i++)
    gv[d + 1][i] = 1ll * gv[d + 1][i] * fv[l][i] % p;
  intt(gv[d + 1]), intt(fv[l]);
  gv[l].resize(max(la + ld - 1, lc));
  for (int i = 0; i < la + ld - 1; i++) gv[l][i] = inc(gv[l][i], gv[d + 1][i]);
  lim = 1, k = 0;
  while (lim <= la + lb) lim = lim << 1, k++;
  for (int i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (k - 1));
  fv[l].resize(lim), fv[d + 1].resize(lim);
  ntt(fv[l]), ntt(fv[d + 1]);
  for (int i = 0; i < lim; i++) fv[l][i] = 1ll * fv[l][i] * fv[d + 1][i] % p;
  intt(fv[l]), fv[l].resize(la + lb - 1);
}
inline void getans(int u) {
  vq[tp[u]].push_back(u);
  for (int i = 0; i < len[u]; i++) {
    int x = v[u][i];
    if (fa[u] == x) continue;
    getans(x);
  }
  if (ch[u][1]) {
    int l = vw[ch[u][1]].size();
    vf[u].resize(l);
    vf[u][0]++;
    for (int i = 0; i < l; i++) vf[u][i] = vw[ch[u][1]][i];
  } else
    vf[u].push_back(1);
  if (u == tp[u]) {
    int l = vq[u].size();
    for (int i = 0; i < l; i++) fv[i].resize(0), gv[i].resize(0);
    getsum(0, l - 1, u);
    l = gv[0].size();
    vw[u].resize(l), vw[u][0]++;
    for (int i = 1; i < l; i++) vw[u][i] = gv[0][i];
  }
}
int main() {
  init(), n = read(), kq = read() % p;
  int u, t;
  for (int i = 1; i < n; i++)
    u = read(), t = read(), v[u].push_back(t), v[t].push_back(u), len[u]++,
    len[t]++;
  find(1), search(1), getans(1);
  long long opt = 0;
  int c = vw[1].size();
  if (c > 1) opt = inc(opt, vw[1][1]);
  long long a = 1, b = 1;
  for (int i = 2; i < c; i++)
    a = a * (kq + i - 1) % p, b = b * (i - 1) % p,
    opt = (opt + a * pows(b, p - 2) % p * vw[1][i]) % p;
  cout << opt << endl;
  return 0;
}
