You are given an expression string of length $L$ consisting of variables and $+,\space -,\space *,\space ()$. The symbol $[k]$ is used to denote the variable $x_k$ $(k \in [1,n])$ . It is assumed that there are $n$ different variables in total. It guarantees that each variable appears only once. So the expression string can be regarded as a multivariate function $f(x_1,x_2,\cdots,x_n)$.
We denote:
$$
g(t)=\sum_{1 \le i_1,i_2,\cdots, i_t \le n} h(i_1,i_2,\cdots,i_t; t)
$$
$$
h(i_1,i_2,\cdots,i_t; t)= \frac{\partial^{t} }{\partial x_{i_1} \partial x_{i_2} \cdots \partial x_{i_t}} f
$$
For the given value of $x_i,i \in [1,n]$. You have the following two tasks.
1.Calculate $g(0),g(1),\cdots,g(5).$
2.For the following m queries, you are given $t \in [1,30],\ i_1,i_2,\cdots,i_t\in [1,n]$, print the answer $h(i_1,i_2,\cdots,i_t; t).$
Since they may be too large, print all of them $mod \ 998244353$.
If you knew little about higher-order partial and mixed derivatives, you can refer to https://en.wikipedia.org/wiki/Partial_derivative#Notation.