SP375 QTREE - Query on a tree

Description

You are given a tree (an acyclic undirected connected graph) with **N** nodes, and edges numbered 1, 2, 3...**N**-1. We will ask you to perfrom some instructions of the following form: - **CHANGE i ti** : change the cost of the i-th edge to ti or - **QUERY a b** : ask for the maximum edge cost on the path from node a to node b

Input Format

The first line of input contains an integer **t**, the number of test cases (**t**

Output Format

For each "**QUERY**" operation, write one integer representing its result.