Types: N: int, a: List[int], b: List[int], c: List[int], Q: int, K: int, x: List[int], y: List[int]

Ranges: 3 ≤ N ≤ 10^5, 1 ≤ a_i, b_i ≤ N (1 ≤ i ≤ N-1), 1 ≤ c_i ≤ 10^9 (1 ≤ i ≤ N-1), 1 ≤ Q ≤ 10^5, 1 ≤ K ≤ N, 1 ≤ x_j, y_j ≤ N (1 ≤ j ≤ Q), x_j ≠ y_j (1 ≤ j ≤ Q), x_j ≠ K, y_j ≠ K (1 ≤ j ≤ Q)

Addtl Info: The given graph is a tree.