func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<long long> v[200005];   long long dp[200005][3];   long long f[200005];   long long g[200005];   const int mod = 998244353;   void dfs(int p, int u) {     for (auto x : v[u]) {       if (x != p) {         dfs(u, x);       }     }     int l = v[u].size() - (p ? 1 : 0);     if (l == 0) {       dp[u][0] = 0;       dp[u][1] = 1;       dp[u][2] = 1;       return;     }     int k = 0;     while (k < v[u].size() && v[u][k] != p) k++;     int cnt = 1;     f[0] = 1;     for (int i = 0; i < v[u].size(); i++) {       int tmp = v[u][i];       if (tmp == p) continue;       f[cnt] = f[cnt - 1] * (dp[tmp][0] + dp[tmp][1]) % mod;       cnt++;     }     cnt = l;     g[l + 1] = 1;     for (int i = v[u].size() - 1; i >= 0; i--) {       int tmp = v[u][i];       if (tmp == p) continue;       g[cnt] = g[cnt + 1] * (dp[tmp][0] + dp[tmp][2]) % mod;       cnt--;     }     for (int i = 1; i <= k; i++) {       dp[u][0] =           (dp[u][0] + f[i - 1] * g[i + 1] % mod * dp[v[u][i - 1]][2]) % mod;     }     dp[u][1] = f[k] * g[k + 1] % mod;     for (int i = k + 1; i <= l; i++) {       dp[u][2] = (dp[u][2] + f[i - 1] * g[i + 1] % mod * dp[v[u][i]][2]) % mod;     }     dp[u][2] = (dp[u][2] + f[l]) % mod;   }   void work() {     int n;     scanf( %d , &n);     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);     }     dfs(0, 1);     printf( %lld n , (dp[1][0] + dp[1][1]) % mod);   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int T;     T = 1;     while (T--) {       work();     }   }   