Codeforces Round #276 A
Let's denote as the number of bits set ('1' bits) in the binary representation of the non-negative integerx.
You are given multiple queries consisting of pairs of integers l and r. For each query, find thex, such thatl ≤ x ≤ r, and is maximum possible. If there are multiple such numbers find the smallest of them.
Input
The first line contains integer n — the number of queries (1 ≤ n ≤ 10000).
Each of the following n