#include <bits/stdc++.h>
using namespace std;
const int N = (1 << 18) + 7, P = 998244353;
int upd(int x) { return x + (x >> 31 & P); }
int qpow(int x, int y) {
  int tms = 1;
  while (y) {
    if (y & 1) tms = 1ll * tms * x % P;
    x = 1ll * x * x % P, y >>= 1;
  }
  return tms;
}
int n, w[N], fac[N], ifac[N], Len, invL, ans, tot;
long long X;
vector<int> F[N], nxt[N], pot[N];
int ind[N], sz[N], son[N], bel[N];
void Init(int len) {
  for (Len = 1; Len < len; Len <<= 1)
    ;
  invL = qpow(Len, P - 2);
  w[0] = 1, w[1] = qpow(3, (P - 1) / Len);
  for (int i = 2; i < Len; ++i) w[i] = 1ll * w[i - 1] * w[1] % P;
}
void DFT(int *p) {
  for (int i = Len / 2, t = 1; i; i >>= 1, t <<= 1)
    for (int j = 0; j < Len; j += (i << 1))
      for (int k = 0, o = 0; k < i; ++k, o += t) {
        int x = p[j + k], y = p[i + j + k];
        p[j + k] = upd(x + y - P), p[i + j + k] = 1ll * w[o] * upd(x - y) % P;
      }
}
void IDFT(int *p) {
  for (int i = 1, t = Len / 2; i < Len; i <<= 1, t >>= 1)
    for (int j = 0; j < Len; j += (i << 1))
      for (int k = 0, o = 0; k < i; ++k, o += t) {
        int x = p[j + k], y = 1ll * w[o] * p[i + j + k] % P;
        p[j + k] = upd(x + y - P), p[i + j + k] = upd(x - y);
      }
  reverse(p + 1, p + Len);
  for (int i = 0; i < Len; ++i) p[i] = 1ll * p[i] * invL % P;
}
void DFT(vector<int> &p) { DFT(&p[0]); }
void IDFT(vector<int> &p) { IDFT(&p[0]); }
void dfs1(int u, int lst) {
  sz[u] = 1;
  for (auto v : nxt[u])
    if (v != lst) {
      dfs1(v, u);
      sz[u] += sz[v], son[u] = sz[v] > sz[son[u]] ? v : son[u];
    }
}
void dfs2(int u, int lst) {
  bel[u] = son[lst] == u ? bel[lst] : u, pot[bel[u]].push_back(u);
  for (auto v : nxt[u])
    if (v != lst) dfs2(v, u);
}
pair<vector<int>, vector<int> > MOVE(vector<int> A) {
  A.resize(A.size() + 1);
  for (int i = (int)A.size() - 2; ~i; --i) A[i + 1] = A[i];
  A[0] = 0;
  return pair<vector<int>, vector<int> >(A, A);
}
pair<vector<int>, vector<int> > solve(int l, int r, int x) {
  if (l == r) return MOVE(F[ind[pot[x][l]]]);
  int mid = (l + r) >> 1;
  pair<vector<int>, vector<int> > L = solve(l, mid, x),
                                  R = solve(mid + 1, r, x);
  Init(L.second.size() + R.second.size());
  L.first.resize(Len);
  L.second.resize(Len);
  R.first.resize(Len);
  R.second.resize(Len);
  DFT(L.first), DFT(L.second), DFT(R.second);
  for (int i = 0; i < Len; ++i)
    L.first[i] = 1ll * L.first[i] * R.second[i] % P,
    L.second[i] = 1ll * L.second[i] * R.second[i] % P;
  IDFT(L.first), IDFT(L.second);
  for (int i = 0; i < Len; ++i) L.first[i] = upd(L.first[i] + R.first[i] - P);
  while (L.first.size() && !L.first.back()) L.first.pop_back();
  while (L.second.size() && !L.second.back()) L.second.pop_back();
  return L;
}
void dfs3(int u, int lst) {
  for (auto v : nxt[u])
    if (v != lst) {
      dfs3(v, u);
      if (v != son[u]) ind[u] = ind[v];
    }
  if (!ind[u]) ind[u] = ++tot, F[ind[u]] = {1};
  if (bel[u] != u) return;
  reverse(pot[u].begin(), pot[u].end());
  F[ind[u]] = solve(0, pot[u].size() - 1, u).first;
  F[ind[u]][0] = upd(F[ind[u]][0] + 1 - P);
}
int main() {
  cin >> n >> X;
  for (int i = 1; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    nxt[x].push_back(y);
    nxt[y].push_back(x);
  }
  dfs1(1, 0), dfs2(1, 0);
  dfs3(1, 0);
  static int coef[N];
  X %= P;
  coef[0] = 1;
  for (int i = 1; i < n; ++i)
    coef[i] = 1ll * coef[i - 1] * (X + i) % P * qpow(i, P - 2) % P;
  for (int i = 1; i <= n; ++i)
    ans = (ans + 1ll * coef[i - 1] * F[ind[1]][i]) % P;
  cout << ans << endl;
  return 0;
}
