You're given two integers $$$n$$$ and $$$q$$$ and two arrays $$$a$$$ and $$$b$$$ of size $$$n$$$.
You need to answer $$$q$$$ queries. In the $$$i$$$-th query, you're given three integers $$$k_i, l_i$$$, and $$$r_i$$$.
At first, a variable $$$x$$$ is set to $$$k_i$$$. Then, for each $$$j$$$ from $$$l_i$$$ to $$$r_i$$$, you must choose exactly one of the following two types of operations:
You need to find the maximum possible value of $$$x$$$ for each query.
The first line contains one positive integer $$$t$$$ ($$$1 \le t \le 10^5$$$), the number of test cases.
Each of the next $$$q$$$ lines contains three integers $$$k_i, l_i$$$, and $$$r_i$$$ ($$$-10^9 \leq k_i \leq 10^9, 1 \le l_i \le r_i \le n$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases and the sum of $$$q$$$ over all test cases do not exceed $$$5 \cdot 10^5$$$.
For each query, output an integer in a new line — the maximum possible value of $$$x$$$.
14 510 2 3 -120 24 28 -108 1 217 1 219 2 325 2 3-2 4 4
24 29 28 30 -2
15 5756829654 557600139 843962687 -24632597 -866775049505319834 616877613 657487273 912786344 924284486481299777 1 3-566119234 2 4478992801 1 2-694494781 3 5-579759578 1 4
2639692257 1460840300 1793422594 924284486 1906882660
In the first query of the first test case, we have $$$x=8$$$ at first. We can do the following operations:
It can be proven that $$$24$$$ is the maximum possible value of $$$x$$$.
In the second query of the first test case, we have $$$x=17$$$ at first. We can do the following operations:
It can be proven that $$$29$$$ is the maximum possible value of $$$x$$$.