Given a rooted tree with (n+1) nodes labeled from (0) to (n), where the root is node (0), and its only child is node (1) . There are (m) distinct chips labeled from (1) to (m), each colored either black or white. Initially, they are arranged on edge ((0,1)) from top to bottom in ascending order of labels. You can perform the following operations any number of times (possibly zero) in any order: Select two edges ((u,v)) and ((v,w)) such that (u) is the parent of (v) and (v) is the parent of (w), where edge ((u,v)) contains at least one chip. Move the bottommost chip on edge ((u,v)) to the topmost place on edge ((v,w)), i. e., above all existing chips on ((v,w)). Select two edges ((u,v)) and ((v,w)) such that (u) is the parent of (v) and (v) is the parent of (w), where edge ((v,w)) contains at least one chip. Move the topmost chip on edge ((v,w)) to the bottommost place on edge ((u,v)), i. e., below all existing chips on ((u,v)). Select two adjacent chips of the same color on the same edge, and swap their positions. Each chip (i) has a movement range, defined as all edges on the simple path from the root to node (d_i). During operations, you must ensure that no chip is moved to an edge outside its movement range. Finally, you must move all chips back to edge ((0,1)). It can be found that the order of the chips may change. Compute the number of possible permutations of chips for the final arrangement on the edge ((0,1)) modulo (998\,244\,353). A permutation of chips is defined as a sequence of length (m) consisting of the labels of the chips from top to bottom. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 5000)). The description of the test cases follows. The first line of each test case contains two integers (n) and (m) ($$$1 \le n, m \le 5000$ |