You are given Q queries. Each input query contains three integers l, r, and k. Print the maximum bitwise AND value of a subset of size k in the segment [l,r].
Input format
Output format
Print the maximum bitwise AND value for each query in a new line.
Constraints
1≤Q≤2e51≤l≤r≤1e181≤k≤r−l+1
For the first query, there is only 1 possible subset {8}.
For the third query, the maximum possible AND value is only possible for subset {4,5,6}.