#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int mod = 998244353;
long long gi() {
  long long x = 0, o = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') o = -1, ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * o;
}
int add(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
int sub(int a, int b) { return a - b < 0 ? a - b + mod : a - b; }
void inc(int &a, int b) { a = a + b >= mod ? a + b - mod : a + b; }
int qpow(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = 1ll * ret * a % mod;
    a = 1ll * a * a % mod, b >>= 1;
  }
  return ret;
}
int w[N], r[N], len, n, x, son[N], siz[N], fa[N], tt;
vector<int> f[N], E[N], p[N];
void NTT(vector<int> &a, int f) {
  for (int i = 0; i < len; i++)
    if (i < r[i]) swap(a[i], a[r[i]]);
  for (int i = 1; i < len; i <<= 1) {
    int wn = qpow(3, (mod - 1) / (i << 1));
    int *W = w;
    *W = 1;
    for (int j = 1; j < i; j++) *(W + j) = 1ll * *(W + j - 1) * wn % mod;
    for (int p = i << 1, j = 0; j < len; j += p)
      for (int k = 0; k < i; k++) {
        int x = a[j + k], y = 1ll * *(W + k) * a[j + k + i] % mod;
        a[j + k] = add(x, y), a[j + k + i] = sub(x, y);
      }
  }
  if (f == -1) {
    reverse(a.begin() + 1, a.begin() + len);
    int inv = qpow(len, mod - 2);
    for (int i = 0; i < len; i++) a[i] = 1ll * a[i] * inv % mod;
  }
}
void NTT_init(int len) {
  ::len = len;
  int l = __builtin_ctz(len);
  for (int i = 0; i < len; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
}
vector<int> operator+(vector<int> a, const vector<int> &b) {
  int n = int(a.size()), m = int(b.size());
  if (n < m) a.resize(m);
  for (int i = 0; i < m; i++) inc(a[i], b[i]);
  return a;
}
vector<int> operator*(vector<int> a, vector<int> b) {
  int n = int(a.size()), m = int(b.size());
  m += n - 1;
  for (n = 1; n < m; n <<= 1)
    ;
  NTT_init(n);
  a.resize(n);
  b.resize(n);
  NTT(a, 1);
  NTT(b, 1);
  for (int i = 0; i < len; i++) a[i] = 1ll * a[i] * b[i] % mod;
  NTT(a, -1);
  a.resize(m);
  return a;
}
void dfs(int u, int ff) {
  fa[u] = ff;
  siz[u] = 1;
  for (auto v : E[u])
    if (v ^ ff) {
      dfs(v, u);
      siz[u] += siz[v];
      if (siz[son[u]] < siz[v]) son[u] = v;
    }
}
pair<vector<int>, vector<int> > solve(int l, int r) {
  if (l == r) return make_pair(p[l], p[l]);
  int mid = (l + r) >> 1;
  pair<vector<int>, vector<int> > ls = solve(l, mid), rs = solve(mid + 1, r);
  return make_pair(ls.first * rs.first, ls.second + ls.first * rs.second);
}
void dp(int u) {
  for (int v = u; v; v = son[v])
    for (auto w : E[v])
      if (w != fa[v] && w != son[v]) dp(w);
  tt = 0;
  for (int v = u; v; v = son[v]) {
    bool fl = 0;
    for (auto w : E[v])
      if (w != fa[v] && w != son[v]) {
        f[w].insert(f[w].begin(), 0);
        fl = 1;
        p[++tt] = f[w];
      }
    if (!fl) p[++tt] = {0, 1};
  }
  f[u] = solve(1, tt).second;
  inc(f[u][0], 1);
}
void debug() {
  vector<int> a = {1, 2}, b = {1, 2, 1};
  a = a * b;
  for (auto x : a) cerr << x << ' ';
  exit(0);
}
int main() {
  n = gi(), x = gi() % mod;
  for (int i = 1, u, v; i < n; i++)
    u = gi(), v = gi(), E[u].push_back(v), E[v].push_back(u);
  dfs(1, 0);
  dp(1);
  int ans = 0, C = 1;
  for (int i = 1; i <= n; i++) {
    ans = (ans + 1ll * C * f[1][i]) % mod;
    C = 1ll * C * (x + i) % mod * qpow(i, mod - 2) % mod;
  }
  cout << ans;
  return 0;
}
