# Queries

There are two types of operations performed on an array(1-based indexing ) .

0 i x - update an index i to value x.

1 i - Tell the maximum from index 1 to i.

The array is initialised by 0 .

**Input**

First line contains the number of test cases , T . Each test case consists of 2 integers N Q, number of elements of array and the number of operations .

The next Q lines the description of the operations .

**Output**

The answer to queries .

**Sample Input**

1

15 9

0 5 3

1 2

1 1

1 3

0 6 7

0 11 8

0 7 9

1 5

1 12

**Sample output**

0

0

0

3

9

**Constraints**

N <= Q < 10^5

x >= 0

x is a 32 bit integer .

T <= 20 .

*Problem Setter : Akshit Poddar*

**Languages:**AWK,Bash,Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Python3,Ruby,Text