Given a positive integer n \leq 40 and a non-negative integer r < 2^n, find all integers from to 2^n - 1 for which the following equality holds:
The first line contains the number of test cases t~(t < 400). Each of the following lines represents a separate test case and contains two integers and .
For each test case, print in a separate line the number of suitable values of , followed by these values in increasing order.
Example 1