The input contains several test cases, and the first line contains a single integer $T$, the number of test cases.
For each test case:
The first line contains three integers $n,m,rt$.
For the following $n-1$ lines, each line contains three integers $u,v,d$, which means that there is an edge between $u,v$, the weight of which is $d$.
The next line contains $n$ integers, the ith integer is $a_i$.
For the following $m$ lines, each line contains three integers $opt,l,r$, which means that there is a operation of type $opt$ for $l,r$.
$1\le T \le 4$, $1\le n,m\le 2\cdot 10^5$, the weight of edge is an integer in range $[0,10^9]$.