You are given an undirected graph, consisting of $N$ vertices and $M$ edges. The $i$-th edge connects vertex $u_ i$ and $v_ i$. This graph may not be simple.
Find the number of spanning trees of the graph modulo $998244353$.
$N$ $M$
$u_ 0$ $v_ 0$
$u_ 1$ $v_ 1$
$u_ 2$ $v_ 2$
$\vdots$
$u_ {M-1}$ $v_ {M-1}$
3 5 0 1 0 1 1 2 2 1 2 0
8
1 2 0 0 0 0
1
4 4 0 1 1 0 2 3 3 2
0
4 8 0 1 0 3 2 1 3 1 3 0 3 0 2 3 1 3
26
| No. | Testdata Range | Score |
|---|