|All-time Popular Problems|
|Maximum difference between node and its ancestor|
|Even and odd elements at even and odd positions|
|Immediate Smaller Element|
|Remove every k'th node|
|Maximum of all subarrays of size k|
|Boundary Traversal of binary tree|
Given two numbers M and N. Write a program to find the position of rightmost different bit in binary representation of numbers.
First line of input contains a single integer T which denotes the number of test cases. T test cases follows. First line of each test case contains two space separated integers M and N.
For each test case print the position of rightmost different bit in binary representation of numbers. If both M and N are same then print -1 in this case.