SOLVE
LATER
You have an array $$ A $$ consisting of $$ N $$ integers and is 1 based index. You have to perform q queries on the given array. Queries can be of 3 types.
$$1\; i\; X$$ : Update the array value at i^{th} position to X i.e. set $$ A[i] = X $$
$$2\; L\; R$$ : Among all the even numbers from position $$L $$ to $$ R $$ find the largest even number
$$3 \;L \;R$$ : Among all the odd numbers from position $$ L $$ to $$ R $$ find the largest odd number
Constraints
$$ 1 \le N \le 10^5 $$
$$ 1 \le L \le R \le N $$
$$ 1 \le i \le N $$
$$ 0 \le X \le 10^{18} $$
$$ 1 \le Q \le 10^5 $$
Input
First line contains $$ N $$ and $$ Q $$ as input. Next line contains $$N$$ space separated integers denoting $$ A[i] $$ . Next $$ Q $$ lines contain $$ Q $$ queries of any of the three above types
Output
Print result of each query of type 2 and 3 in a new line