#arc130d. [arc130_d]Zigzag Tree

[arc130_d]Zigzag Tree

有一个 nn 个点的树,编号为 1n1\sim n,第 ii 条边连接 aia_ibib_i

找出 1n1\sim n 的排列 pp 的个数,满足对于任意 1a,b,cn1\le a,b,c\le n,其中点 aa 和点 bb 相邻,点 bb 和点 cc 相邻,都有 pa<pb>pcp_a<p_b>p_cpa>pb<pcp_a>p_b<p_c

998244353998244353 取模。