Given a tree with $n$ nodes, you start at node $x$. In each step, you choose one of the edges adjacent to your current node with equal probability and move to the adjacent node.
There are $Q$ queries. Each query provides a set $S$. Calculate the expected number of steps to visit all nodes in the set $S$ starting from $x$.
Specifically, node $x$ (the starting point) is considered to have been visited once at the beginning.
The answer should be taken modulo $998244353$.
Input
The first line contains three positive integers $n, Q, x$.
The next $n-1$ lines each contain two positive integers $(u, v)$ describing a tree edge.
The next $Q$ lines each start with an integer $k$, representing the size of the set, followed by $k$ distinct integers representing the set $S$.
Output
Output $Q$ lines, each containing a non-negative integer representing the answer.
Examples
Input 1
3 5 1
1 2
2 3
1 1
1 3
2 2 3
3 1 2 3
2 1 2
Output 1
0
4
4
4
1
Note
The tree in the example is a chain of length $3$, and the starting point is one end of the chain, so the answer only depends on the farthest node.
When the farthest node is $2$, it clearly takes $1$ step.
When the farthest node is $3$, it can be calculated that the expected number of steps to reach it is $4$.
Subtasks
For $20\%$ of the data, $1 \leq n, Q \leq 5$.
Another $10\%$ of the data satisfies the condition that the given tree is a chain.
Another $10\%$ of the data satisfies the condition that $k=1$ for all queries.
Another $30\%$ of the data satisfies $1 \leq n \leq 10$ and $Q=1$.
For $100\%$ of the data, $1 \leq n \leq 18$, $1 \leq Q \leq 5000$, and $1 \leq k \leq n$.