The first line of the input contains a single integer $T$ ($1 \leq T \leq 100$), denoting the number of test cases.
The first line of each test case contains three integers $q,a,b$ ($1 \leq q \leq 10^5$, $1 \leq a \leq b < 998244353$), denoting the number of queires and the probability $p=a/b$.
The second line of each test case contains $q$ integers $n_1,n_2,\ldots,n_q$ ($1 \leq n_i < 5\times 10^5$ for each $1 \leq i \leq q$) seperated by spaces, denoting that Yukikaze wants to know the expected number of connected components in $G(n_i,p)$.
Let $N$ be the sum of the maximum $n_i$ of each test case, and $Q$ be the sum of $q$ of all test cases. It's guaranteed that $N \leq 5\times 10^5$ and $Q \leq 10^5$.