func_code_string: #include <bits/stdc++.h>   using namespace std;   inline int read() {     int n = 0;     char c;     for (c = getchar(); c <  0  || c >  9 ; c = getchar())       ;     for (; c >=  0  && c <=  9 ; c = getchar()) n = n * 10 + c - 48;     return n;   }   const int maxn = 1e5 + 5, N = 1 << 18, mo = 998244353;   int i, j, n, fa[maxn], size[maxn], ni[maxn], son[maxn];   long long x;   vector<int> g[maxn], F[maxn], s1[maxn << 2], s2[maxn << 2], ans[maxn];   int t1[N], t2[N], len, f[N], w[N];   int qs(int x, int y) {     int s = 1;     for (; y; y >>= 1, x = (long long)x * x % mo)       if (y & 1) s = (long long)s * x % mo;     return s;   }   void mod(int &x) { x -= x >= mo ? mo : 0; }   namespace Poly {   void pre(int len) {     int i, m = len >> 1;     for (i = 1; i <= len - 1; i++) f[i] = f[i >> 1] >> 1 | (i & 1 ? m : 0);   }   void dft(int *a, bool sig) {     int i;     for (i = 0; i <= len - 1; i++)       if (f[i] < i) swap(a[f[i]], a[i]);     for (int i = 1, d = N >> 1; i < len; i <<= 1, d >>= 1)       for (int j = 0; j < len; j += i << 1)         for (int k = 0, o = 0; k < i; k++, o += d) {           int u = a[j + k], v = (long long)a[i + j + k] * w[o] % mo;           a[j + k] = u + v >= mo ? u + v - mo : u + v;           a[i + j + k] = u - v < 0 ? u - v + mo : u - v;         }     if (sig) {       reverse(a + 1, a + len);       int re = qs(len, mo - 2);       for (i = 0; i <= len - 1; i++) a[i] = (long long)a[i] * re % mo;     }   }   void mul(vector<int> &a, vector<int> &b, vector<int> &c) {     len = 1;     for (; len < a.size() + b.size();) len <<= 1;     for (int i = 0; i < a.size(); i++) t1[i] = a[i];     for (int i = a.size(); i < len; i++) t1[i] = 0;     for (int i = 0; i < b.size(); i++) t2[i] = b[i];     for (int i = b.size(); i < len; i++) t2[i] = 0;     pre(len);     dft(t1, 0), dft(t2, 0);     for (int i = 0; i < len; i++) t1[i] = (long long)t1[i] * t2[i] % mo;     dft(t1, 1);     c.resize(a.size() + b.size() - 1);     for (int i = 0; i < c.size(); i++) c[i] = t1[i];   }   void add(vector<int> &a, vector<int> &b, vector<int> &c) {     c.resize((a.size() > b.size() ? a.size() : b.size()));     for (int i = 0; i < c.size(); i++)       mod(c[i] = (i < a.size() ? a[i] : 0) + (i < b.size() ? b[i] : 0));   }   void right(vector<int> &a, vector<int> &b) {     b.resize(a.size() + 1);     for (int i = 1; i < a.size(); i++) b[i + 1] = a[i];     b[0] = 0, b[1] = 1;   }   }  // namespace Poly   void dfs(int x, int y) {     size[x] = 1, fa[x] = y;     for (int i = 0; i < g[x].size(); i++) {       int go = g[x][i];       if (go == y) continue;       dfs(go, x);       size[x] += size[go];       if (size[go] > size[son[x]]) son[x] = go;     }   }   void solve(int k, int l, int r) {     static vector<int> t;     if (l == r) {       s1[k] = s2[k] = F[l];       return;     }     int m = ((l + r) >> 1), lk = k << 1, rk = lk + 1;     solve(lk, l, m);     solve(rk, m + 1, r);     Poly::mul(s1[lk], s1[rk], s1[k]);     Poly::mul(s1[lk], s2[rk], t);     Poly::add(s2[lk], t, s2[k]);   }   void calc(int x) {     int tot = 0;     for (int i = x; i; i = son[i]) F[++tot] = ans[i];     solve(1, 1, tot);     ans[x] = s2[1];   }   void Dfs(int x, int y) {     if (son[x]) Dfs(son[x], y);     for (int i = 0; i < g[x].size(); i++) {       int go = g[x][i];       if (go == fa[x] || go == son[x]) continue;       Dfs(go, go);       Poly::right(ans[go], ans[x]);     }     if (!ans[x].size()) ans[x].resize(2), ans[x][0] = 0, ans[x][1] = 1;     if (x == y) calc(x);   }   int main() {     w[0] = 1, w[1] = qs(3, (mo - 1) / N);     for (i = 2; i <= N - 1; i++) w[i] = (long long)w[i - 1] * w[1] % mo;     n = read(), scanf( %lld , &x);     for (i = 1; i <= n - 1; i++) {       int a = read(), b = read();       g[a].push_back(b);       g[b].push_back(a);     }     dfs(1, 0);     Dfs(1, 1);     long long C = 1, Ans = 0;     x %= mo;     ni[1] = ni[0] = 1;     for (i = 2; i <= n; i++) ni[i] = (long long)(mo - mo / i) * ni[mo % i] % mo;     for (i = 1; i <= n; i++) {       Ans += C * ans[1][i] % mo;       C = C * (i + x) % mo * ni[i] % mo;     }     printf( %I64d n , Ans % mo);   }   