You're given three integers and .
The majesticness of any positive integer is equal to the maximum integer that gives a positive integer value in this equation:
Out of all the integer numbers in the range (l,r), find the one with the maximum majesticness, if multiple answers exist output the maximum one.
The first line consists of a single integer (1 \le t \le 2 \cdot 10^5)the number of testcases.
Each testcase consists of three integers and (2 \le x \le 10^9 , 1 \le l \le r \le 10^9).
The output consists of lines, each containing one value (the number with the maximum majesticness in the range (l,r), if multiple numbers satisfy the condition output the maximum one).
Example 1
Subtask ( points): No additional constraints