Problem Statement
You are given a tree with $N$ vertices. The vertices are numbered from $1$ to $N$, and the $i$-th edge connects vertices $u_i$ and $v_i$.
Initially, on each vertex of the tree is written number $1$.
In one operation, you can do the following:
- Choose any vertex
$v$of the tree. Let$X$be the XOR of the values written in the neighbors of$v$. Then, if the number written on$v$is$a_v$, replace it by$(a_v\ \mathrm{XOR}\ X)$.
You can perform this operation any finite (maybe zero) number of times. How many configurations can you achieve? As this number can be large, output it modulo $998244353$.
Two configurations are called different if there exists a vertex $v$, such that the numbers written in $v$ in these configurations are different.
Constraints
$3 \le N \le 2\cdot 10^5$$1\le u_i, v_i \le N$$u_i \neq v_i$- The input represents a valid tree.
Input
Input is given from Standard Input in the following format:
N
u_1 v_1
u_2 v_2
\vdots
u_{N-1} v_{N-1}
Output
Output the number of configurations you can get from the initial state, modulo $998244353$.
样例
4
1 2
2 3
3 4
10
5
1 2
1 3
1 4
1 5
24
6
1 3
2 3
3 4
4 5
4 6
40
9
1 2
2 3
1 4
4 5
1 6
6 7
7 8
8 9
255
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。