There are multiple cases in the data set.
The first line of input contains an integer $ T $ denoting number of test cases.
For each case, the first line contains two space-separated integers, $ N $ and $ k $, respectively.
The second line contains $ N $ space-separated integers, denoting $ a_1 $ to $ a_N $.
Each of the subsequent lines contains two space-separated integers defining an edge connecting nodes $u$ and $ v $ , where node $ u $ is the parent of node $ v $.
Constrains:
$ 1 \le N \le 10^5 $
$ 0 \le a_i \le 10^9 $
$ 0 \le k \le 10^{18} $