You are given a positive integer n <= 40 and non-negative integer r < 2^n. Find all integers k from 0 to 2^n-1 such that C(2^n-1,k) mod 2^n = r.
The input file contains T < 400 test cases. The first line of the input file contains the integer T. Each of the following T lines describes one test case and contains the numbers n and r separated by space.
The output file should consist of T lines. Each line should contain the number of the required values of k followed by these values in increasing order for the corresponding test case from the input file. Numbers in the line should be separated by spaces.