You are given a rooted tree with root $$$1$$$ and $$$N$$$ nodes. Each node $$$i$$$ has an initial weight $$$M_i$$$. At all times, the system strictly maintains the following property: for any non-root node $$$x$$$, its weight never exceeds that of its parent, that is, $$$M_{\text{parent}(x)} \ge M_x$$$.
You need to process $$$Q$$$ operations online. The operations are of the following two types:
The input contains multiple test cases.
The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^4$$$), denoting the number of test cases.
For each test case, the first line contains two integers $$$N, Q$$$.
The second line contains $$$N$$$ integers $$$M_1, M_2, \dots, M_N$$$, and it is guaranteed that the initial weights satisfy the property described above.
The next $$$N - 1$$$ lines each contain two integers $$$u, v$$$, representing an edge in the tree.
The following $$$Q$$$ lines each contain three integers $$$opt, a, b$$$, representing an operation: when $$$opt = 1$$$, it denotes a 1 u w operation; when $$$opt = 2$$$, it denotes a 2 x v operation.
Constraints:
For each test case, output $$$Q$$$ lines, each corresponding to the result of one operation:
15 6100 80 50 30 201 21 32 42 51 4 401 5 1502 2 302 2 -602 4 101 4 40
2 -1 FAILED FAILED SUCCESS 4
In the sample, the tree structure is as follows: node $$$1$$$ has children $$$2$$$ and $$$3$$$; node $$$2$$$ has children $$$4$$$ and $$$5$$$.
The initial weights are $$$M = [100, 80, 50, 30, 20]$$$.
| Name |
|---|


