Given $n, m, k$ and $m$ pairs of sequences $(a_i, b_i)$, where $|a_i|=|b_i|=d_i$, for all $0\leq t < 2^n$, calculate: $$ S_t=\sum_{c \in C_t}\prod_{i=1}^m b_{i,c_i} \pmod {10^{18}+125953} $$
where $C_t$ is the set of all sequences $c$ such that $1\leq c_i\leq d_i$ and $\oplus_{i=1}^m a_{i,c_i}=t$.
Input
The first line contains three positive integers $n, m, k$.
Then, $F_1, \dots, F_m$ are input sequentially.
For each $F_i$:
The first line contains a positive integer $d_i$.
The next line contains $d_i$ non-negative integers $a_{i,j}$.
The next line contains $d_i$ positive integers $b_{i,j}$.
Output
Output $2^n$ integers $S_0, \dots, S_{2^n-1}$ on a single line.
Examples
Input 1
4 3 4 3 5 1 4 1 1 4 4 8 2 7 3 11 13 9 6 4 10 0 2 2 7 9 8 3
Output 1
165 539 135 518 737 407 911 410 105 442 0 121 865 358 484 121
Constraints
$1\leq n \leq 20$, $1\leq d_i\leq k\leq 10$, $\sum_i 2^{d_i}\leq 2^{17}$, $0\leq a_{i,j}<2^n$, $1\leq b_{i,j} < P$.