A weather service keeps sensors in a row along a mountain road, numbered to , and every sensor reports one temperature.
Two things happen during the day, over and over:
- a forecaster asks for the highest temperature reported by the sensors on some stretch of road,
- a sensor is recalibrated and its reading is replaced by a new one.
Write a program that answers every question, using the readings as they are at that moment.
Input
First line of input will be a single integer - the number of testcases.
The first line of each testcase contains two integers and - the number of sensors and the number of events.
The second line contains integers - the readings the sensors start with.
Each of the next lines describes one event, in one of two forms:
a l r- print the highest reading among sensors ;b i x- sensor is recalibrated, its reading becomes .
Sensors are numbered from , so , and are all between and .
Output
For every event of type a, in the order the events appear, print on its own line the highest reading on that stretch.
Example
2 6 6 3 1 4 1 5 9 a 0 5 a 1 3 b 2 7 a 1 3 b 5 -2 a 0 5 1 3 -5 a 0 0 b 0 10 a 0 0
9 4 7 7 -5 10
In the first testcase the readings start as . The whole row peaks at , and sensors to hold , so their highest is . Sensor is then recalibrated to , which makes the same question answer . Finally sensor drops to , the row becomes , and its highest is .
Constraints
and
The sum of over all testcases does not exceed , and so does the sum of