The Brigadier is destroying a nuclear power station.
There are $$$n$$$ cores and $$$m$$$ data cables in the nuclear power station. The $$$i$$$-th core has energy $$$a_i$$$, each cable connects two different cores. To destroy the station, the Brigadier needs to create enough interference in it. For a data cable connecting cores $$$u,v$$$, it produces interference with value $$$a_u \text{ XOR } a_v$$$. The total interference in the station is the sum of the interference produced by all data cables.
To help the Brigadier destroy the station, Mari Gold hacked into the factory system and made a button. Each time the button is pressed, the following steps are done in order:
The Brigadier wants to know the expected value of the total interference in the station after pressing the button $$$k$$$ times in a row.
As the answer may be very large, you only need to output it modulo $$$998244353$$$$$$^{\text{∗}}$$$.
$$$^{\text{∗}}$$$Let $$$M=998244353$$$:
Each test file contains multiple test cases. The first line contains an integer $$$T$$$ $$$(1 \leq T \leq 10^3)$$$, the number of test cases.
For each test case, the first line contains three positive integers $$$n,m,k$$$ $$$(4 \leq n \leq 2 \times 10^5,1 \leq m \leq 5 \times 10^5,0 \leq k \leq 10^{18})$$$, denoting the number of cores, the number of data cables, and the number of times the button is pressed.
The second line contains $$$n$$$ integers $$$a_i$$$ $$$(0 \leq a_i \lt 2^{30})$$$, denoting the energy of each core.
The next $$$m$$$ lines each contain two integers $$$u,v$$$ $$$(1 \leq u,v \leq n,u \neq v)$$$, denoting a data cable whose two ends are connected to cores $$$u,v$$$.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \times 10^5$$$, and the sum of $$$m$$$ does not exceed $$$5 \times 10^5$$$.
For each test case, output one line containing one integer, the expected value of the total interference modulo $$$998244353$$$.
14 3 11 2 4 81 22 33 4
249561110
14 6 20 2 1 34 23 41 22 12 43 2
62390284
In Sample 1, the two random choices when pressing the button and the corresponding total interference values are shown in the table below:
| 1 | 2 | 3 | 4 | |
| 1 | 21 | 20 | 18 | 21 |
| 2 | 20 | 21 | 21 | 27 |
| 3 | 18 | 21 | 21 | 25 |
| 4 | 21 | 27 | 25 | 21 |
The sum of the total interference values over all cases is $$$348$$$, so the expected value is $$$\frac{348}{16}=\frac{87}{4} \equiv 249561110 \pmod {998244353}$$$.