Problem: You are given two integers n and k. You are asked to choose maximum number of distinct integers from 1 to n so that there is no subset of chosen numbers with sum equal to k.

A subset of a set is a set that can be obtained from initial one by removing some (possibly all or none) elements of it.

Input

The first line contains the number of test cases T (1 ≤ T ≤ 100).

Each of the next T lines contains two integers n and k (1 ≤ k ≤ n ≤ 1000) — the description of test cases.

Output

For each test case output two lines. In the first line output a single integer m — the number of chosen integers.

In the second line output m distinct integers from 1 to n — the chosen numbers.

If there are multiple answers, print any. You can print the numbers in any order.

Example

Input


3
3 2
5 3
1 1


Output


2
3 1 
3
4 5 2 
0

Solution (in PYTHON3):

Solution:
# by the authority of GOD     author: Kritarth Sharma #
import math
from collections import defaultdict,Counter
from itertools import permutations
from decimal import Decimal, localcontext
from collections import defaultdict


ii = lambda : int(input())
li = lambda:list(map(int,input().split()))
def main():
    for _ in range(int(input())):
        n,k=li()
        s=set()
        for i in range(n,0,-1):
            if k-i not in s and i!=k:
                s.add(i)
        print(len(s))
        if len(s)>0:
            print(*s)

    


        
        




        



import os,sys
from io import BytesIO,IOBase
#Fast IO Region
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
from math import gcd
def find(l):
    c=0
    for i in range(len(l)):
        if l[i]>1:
            c=i
            
            return c
    else:
        return None
def checkDivisibility(n, digit) : 
       
    # If the digit divides the 
    # number then return true 
    # else return false. 
    return (digit != 0 and n % digit == 0) 
       
# Function to check if 
# all digits of n divide 
# it or not 
def allDigitsDivide( n) : 
    nlist = list(map(int, set(str(n))))
    for digit in nlist : 

        if  digit!=0 and not (checkDivisibility(n, digit)) : 
            return False
    return True
def lcm(s):
    a=[int(d) for d in str(s)]
    lc = a[0]
    for i in a[1:]:
        if i!=0:
            lc = lc*i//gcd(lc, i)
    return(lc)
if __name__ == "__main__":
    main()


def random():
    """My code gets caught in plagiarism check for no reason due to the fast IO template, .
     Due to this reason, I am making useless functions"""
    rating=100
    rating=rating*100
    rating=rating*100
    
    print(rating)
def random():
    """My code gets caught in plagiarism check for no reason due to the fast IO template, .
     Due to this reason, I am making useless functions"""
    rating=100
    rating=rating*100
    rating=rating*100
    
    print(rating)
def random():
    """My code gets caught in plagiarism check for no reason due to the fast IO template, .
     Due to this reason, I am making useless functions"""
    rating=100
    rating=rating*100
    rating=rating*100
    
    print(rating)
def SieveOfEratosthenes(n):
        prime = [True for i in range(n+1)]
        p = 2
        while (p * p <= n):

            # If prime[p] is not 
            # changed, then it is a prime
            if (prime[p] == True):

                # Update all multiples of p
                for i in range(p * p, n+1, p):
                    prime[i] = False
            p += 1
        l=[1,]
        # Print all prime numbers
        for p in range(2, n+1):
            if prime[p]:
                l.append(p)
        return l
def fact(n): 
    return 1 if (n == 1 or n == 0) else n * fact(n - 1)  
def prime(n) : 
    if (n <= 1) : 
        return False
    if (n <= 3) : 
        return True
    if (n % 2 == 0 or n % 3 == 0) : 
        return False
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
    return True