t=int(input()) ab=[list(map(int,input().split())) for _ in range(t)] for a,b in ab: ary=[] now=1 while b-a>0: while a%(2*now)==0: now*=2 while a%now!=0: now//=2 while b-a