You have a knapsack with the capacity of $W$. There are also $n$ items, the $i$-th one has weight $w_i$.

You want to put some of these items into the knapsack in such a way that their total weight $C$ is at least half of its size, but (obviously) does not exceed it. Formally, $C$ should satisfy: $\lceil \frac{W}{2}\rceil \le C \le W$.

Output the list of items you will put into the knapsack or determine that fulfilling the conditions is impossible.

If there are several possible lists of items satisfying the conditions, you can output any. Note that you don't have to maximize the sum of weights of items in the knapsack.


-----Input-----

Each test contains multiple test cases. The first line contains the number of test cases $t$ ($1 \le t \le 10^4$). Description of the test cases follows.

The first line of each test case contains integers $n$ and $W$ ($1 \le n \le 200000$, $1\le W \le 10^{18}$).

The second line of each test case contains $n$ integers $w_1, w_2, \dots, w_n$ ($1 \le w_i \le 10^9$) — weights of the items.

The sum of $n$ over all test cases does not exceed $200000$.


-----Output-----

For each test case, if there is no solution, print a single integer $-1$.

If there exists a solution consisting of $m$ items, print $m$ in the first line of the output and $m$ integers $j_1$, $j_2$, ..., $j_m$ ($1 \le j_i \le n$, all $j_i$ are distinct) in the second line of the output  — indices of the items you would like to pack into the knapsack.

If there are several possible lists of items satisfying the conditions, you can output any. Note that you don't have to maximize the sum of weights items in the knapsack.


-----Examples-----

Input
3
1 3
3
6 2
19 8 19 69 9 4
7 12
1 1 1 17 1 1 1
Output
1
1
-1
6
1 2 3 5 6 7


-----Note-----

In the first test case, you can take the item of weight $3$ and fill the knapsack just right.

In the second test case, all the items are larger than the knapsack's capacity. Therefore, the answer is $-1$.

In the third test case, you fill the knapsack exactly in half.

Difficulty: EASY
Tags: Greedy algorithms

Sorting

Constructive algorithms
Skill types: Sorting

Greedy algorithms

Starter code:

Solutions:
import math
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l1 = list(map(int, input().split()))
	l = []
	for i in range(n):
		l.append([l1[i], i + 1])
	s = 0
	l.sort()
	ans = -1
	st = 0
	end = n - 1
	inf = -1
	for i in range(n):
		if l[i][0] >= math.ceil(w / 2) and l[i][0] <= w:
			inf = i
			ans = 1
			st = i
			end = i
			break
		elif l[i][0] < math.ceil(w / 2):
			s += l[i][0]
			if s >= math.ceil(w / 2):
				end = i
				ans = 1
				break
	k = []
	if ans != -1:
		for i in range(st, end + 1):
			k.append(l[i][1])
		print(len(k))
		print(*k)
	else:
		print(-1)


from collections import Counter
import string
import math
import sys
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))

def printDivisors(n):
	divisors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				divisors.append(i)
			else:
				divisors.extend((i, n // i))
		i = i + 1
	return divisors

def countTotalBits(num):
	binary = bin(num)[2:]
	return len(binary)

def isPrime(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
mod = 10 ** 9 + 7

def comp(x):
	return x[1]

def SieveOfEratosthenes(n):
	global primes
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			primes.append(p * p)
primes = []

def binary_search(arr, x):
	low = 0
	high = len(arr) - 1
	mid = 0
	while low <= high:
		mid = (high + low) // 2
		if arr[mid] < x:
			low = mid + 1
		elif arr[mid] > x:
			high = mid - 1
		else:
			return mid
	return -1
testCases = 1
testCases = vary(1)
for _ in range(testCases):
	(n, w) = vary(2)
	num = array_int()
	if 1:
		pum = []
		for i in range(n):
			pum.append([num[i], i + 1])
		pum.sort(reverse=True)
		sumt = 0
		ans = []
		for i in range(n):
			if sumt + pum[i][0] > w:
				continue
			else:
				sumt += pum[i][0]
				ans.append(pum[i][1])
				if sumt >= w / 2:
					break
		if sumt >= w / 2:
			print(len(ans))
			print(*ans)
		else:
			print(-1)


inp = lambda : int(input())
inpm = lambda : map(int, input().split())
inpl = lambda : list(inpm())
l2mn = lambda _n, _m: [[0 for __ in range(_m)] for _ in range(_n)]
l2n = lambda _n: l2mn(_n, _n)
INF = int(1e+18)
MOD = int(1000000000.0) + 7
N = 2000009

def solve():
	(n, w) = inpm()
	left = (w + 1) // 2
	a = inpl()
	res = []
	s = 0
	ok = False
	for i in range(n):
		x = a[i]
		if x < left:
			s += x
			res.append(i + 1)
			if s >= left:
				ok = True
				break
		elif x > w:
			continue
		else:
			res = [i + 1]
			ok = True
			break
	if ok:
		print(len(res))
		print(*res)
	else:
		print(-1)

def main():
	t = inp()
	for i in range(t):
		solve()
main()


from math import ceil
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	x = ceil(w / 2)
	su = 0
	for i in l:
		if i <= w:
			su += i
	if min(l) > w or su < x:
		print(-1)
	else:
		(ans, f) = (0, 0)
		num = []
		for i in range(n):
			if x <= l[i] <= w:
				f = 1
				ans = i + 1
				break
			if ans + l[i] < w:
				ans += l[i]
				num.append(i + 1)
			if x <= ans <= w:
				break
		if f:
			print(1)
			print(ans)
		else:
			print(len(num))
			print(*num)


import math, sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	x = list(map(int, input().split()))
	st = math.ceil(w / 2)
	p = [[x[i], i + 1] for i in range(n)]
	p.sort(reverse=True)
	cnt = 0
	v = set()
	for each in p:
		if cnt >= st:
			break
		if each[0] > w:
			continue
		if cnt + each[0] <= w:
			cnt += each[0]
			v.add(each[1])
	if cnt < st:
		print(-1)
	else:
		print(len(v))
		print(*v)


import sys

def run(use_file_io):
	if use_file_io:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
		try:
			solve()
		finally:
			sys.stdin.close()
			sys.stdout.close()
	else:
		solve()

def getnums():
	return map(int, input().split())

def solve():
	tests = int(input())
	for i in range(tests):
		(n, W) = getnums()
		M = -(-W // 2)
		p = [None] * n
		for (idx, elm) in enumerate(getnums()):
			p[idx] = (elm, idx)
		w = list(sorted(filter(lambda x: x[0] <= W, p)))
		n = len(w)
		if n == 0:
			print(-1)
		else:
			a = 0
			b = 1
			s = w[0][0]
			while b < n:
				if s < M:
					s += w[b][0]
					b += 1
				elif s > W:
					s -= w[a][0]
					a += 1
				else:
					break
			while a < n:
				if s > W:
					s -= w[a][0]
					a += 1
				else:
					break
			if M <= s <= W:
				print(b - a)
				indices = []
				for i in range(a, b):
					indices.append(w[i][1] + 1)
				indices.sort()
				print(*indices)
			else:
				print(-1)
run(False)


import math
for u in range(int(input())):
	(n, W) = tuple(map(int, input().split()))
	w = list(map(int, input().split()))
	ans = -1
	for i in range(n):
		if math.ceil(W / 2) <= w[i] <= W:
			ans = i + 1
			break
	if ans == -1:
		d = {}
		y = 0
		l = []
		x = 0
		for i in range(n):
			d[w[i]] = i
			if w[i] < math.ceil(W / 2):
				l.append(i)
				x += w[i]
		if l == [] or x < math.ceil(W / 2):
			print(-1)
		else:
			i = len(l) - 1
			while x > W:
				x -= w[l[i]]
				i -= 1
			print(i + 1)
			for j in range(i + 1):
				print(l[j] + 1, end=' ')
			print()
	else:
		print(1)
		print(ans)


import bisect
import collections
import copy
import functools
import heapq
import itertools
import math
import random
import re
import sys
import time
import string
sys.setrecursionlimit(99999)
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	temp = []
	for (i, c) in enumerate(arr, start=1):
		temp.append([c, i])
	temp.sort(reverse=True)
	s = 0
	ans = []
	for (c, i) in temp:
		if s + c <= w:
			s += c
			ans.append(i)
	if 2 * s >= w:
		print(len(ans))
		print(*sorted(ans))
	else:
		print(-1)


for _ in range(int(input())):
	(n, w) = list(map(int, input().split()))
	wts = list(map(int, input().split()))
	ans = []
	cnt = 0
	fnd = False
	ar = False
	for (j, i) in enumerate(wts):
		if i > w:
			continue
		if i >= (w + 1) // 2:
			print(1)
			print(j + 1)
			ar = True
			break
		cnt += i
		ans.append(str(j + 1))
		if cnt >= (w + 1) // 2:
			fnd = True
			break
	if not ar:
		if not fnd:
			print(-1)
		else:
			print(len(ans))
			print(' '.join(ans))


import sys
tests = int(sys.stdin.readline())
for _ in range(tests):
	(n, w) = list(map(int, sys.stdin.readline().split()))
	ws = list(map(int, sys.stdin.readline().split()))
	m = w // 2 if w % 2 == 0 else w // 2 + 1
	itms = []
	cur_sum = 0
	ws = [(v, nr) for (nr, v) in enumerate(ws)]
	ws.sort(reverse=True)
	for (el, nr) in ws:
		cur_sum += el
		if cur_sum > w:
			cur_sum -= el
			continue
		itms.append(str(nr + 1))
		if cur_sum >= m:
			print(len(itms))
			print(' '.join(itms))
			break
	else:
		print('-1')


import sys
import bisect
(*data,) = map(int, sys.stdin.read().split()[::-1])

def inp():
	return data.pop()
output = []
for _ in range(inp()):
	(n, W) = (inp(), inp())
	(*w,) = [inp() for _ in range(n)]
	lbound = (W + 1) // 2
	items = sorted(range(n), key=lambda i: w[i])
	if w[items[0]] > W:
		output.append('-1')
	elif sum(w) < lbound:
		output.append('-1')
	else:
		s = 0
		for i in range(n):
			if lbound <= w[items[i]] <= W:
				output.append('1')
				output.append(str(items[i] + 1))
				break
		else:
			for i in range(n):
				s += w[items[i]]
				if s >= lbound and s <= W:
					ans = [v + 1 for v in items[:i + 1]]
					output.append(str(len(ans)))
					output.append(' '.join(map(str, sorted(ans))))
					break
			else:
				output.append('-1')
print('\n'.join(output))


from math import ceil
for T in range(int(input())):
	(n, s) = map(int, input().split())
	w = list(map(int, input().split()))
	w = [[w[i], i + 1] for i in range(n)]
	w.sort(key=lambda x: x[0])
	s1 = 0
	a = []
	for i in range(n - 1, -1, -1):
		val = w[i][0]
		s1 += val
		a.append(w[i][1])
		if s1 > s:
			a.pop()
			s1 -= val
	if s1 < ceil(s / 2):
		print(-1)
	else:
		print(len(a))
		print(*a)


t = int(input())
res = []
for _ in range(t):
	(n, W) = input().split()
	(n, W) = (int(n), int(W))
	ll = [int(s) for s in input().split()]
	flags = [True] * n
	for (i, l) in enumerate(ll):
		if l > W:
			flags[i] = False
		elif l * 2 >= W:
			res.append(1)
			res.append(i + 1)
			break
	else:
		summa = 0
		indexes = []
		for (i, l) in enumerate(ll):
			if flags[i]:
				summa += l
				indexes.append(i)
				if summa * 2 >= W:
					break
		if summa * 2 >= W:
			res.append(len(indexes))
			res.append(' '.join([str(i + 1) for i in indexes]))
		else:
			res.append(-1)
for e in res:
	print(e)


def solve():
	(n, w) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	for i in range(n):
		if a[i] > w:
			continue
		if 2 * a[i] >= w:
			print(f'1\n{i + 1}')
			return
	s = 0
	ans = []
	for i in range(n):
		if a[i] > w:
			continue
		s += a[i]
		ans.append(i + 1)
		if 2 * s >= w:
			break
	if 2 * s >= w:
		print(len(ans))
		print(*ans)
	else:
		print(-1)
t = int(input())
for test in range(t):
	solve()


import math

def solve(n, W, a):
	lower = math.ceil(W / 2)
	upper = W
	curr_w = 0
	res = []
	for (i, v) in enumerate(a):
		if lower <= v <= upper:
			print(1)
			return i + 1
		if v >= upper:
			continue
		curr_w += v
		res.append(str(i + 1))
		if curr_w > W:
			return -1
		if curr_w >= lower:
			print(len(res))
			return ' '.join(res)
	return -1
t = int(input())
while t:
	t -= 1
	(n, W) = map(int, input().split())
	a = list(map(int, input().split()))
	print(solve(n, W, a))


import sys
import time
import os
from math import sqrt, log, log2, ceil, log10, gcd, floor, pow, sin, cos, tan, pi, inf, factorial
from copy import copy, deepcopy
from sys import exit, stdin, stdout
from collections import Counter, defaultdict, deque
from itertools import permutations
import heapq
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
mod = 1000000007
iinp = lambda : int(sys.stdin.readline())
inp = lambda : sys.stdin.readline().strip()
strl = lambda : list(inp().strip().split(' '))
intl = lambda : list(map(int, inp().split(' ')))
mint = lambda : map(int, inp().split())
flol = lambda : list(map(float, inp().split(' ')))
flush = lambda : stdout.flush()

def permute(nums):

	def fun(arr, nums, cur, v):
		if len(cur) == len(nums):
			arr.append(cur.copy())
		i = 0
		while i < len(nums):
			if v[i]:
				i += 1
				continue
			else:
				cur.append(nums[i])
				v[i] = 1
				fun(arr, nums, cur, v)
				cur.pop()
				v[i] = 0
				i += 1
		return arr
	res = []
	nums.sort()
	v = [0] * len(nums)
	return fun(res, nums, [], v)

def subsets(res, index, arr, cur):
	res.append(cur.copy())
	for i in range(index, len(arr)):
		cur.append(arr[i])
		subsets(res, i + 1, arr, cur)
		cur.pop()
	return res

def sieve(N):
	root = int(sqrt(N))
	primes = [1] * (N + 1)
	(primes[0], primes[1]) = (0, 0)
	for i in range(2, root + 1):
		if primes[i]:
			for j in range(i * i, N + 1, i):
				primes[j] = 0
	return primes

def bs(arr, l, r, x):
	if x < arr[0] or x > arr[len(arr) - 1]:
		return -1
	while l <= r:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	p = int(sqrt(n))
	for i in range(5, p + 1, 6):
		if n % i == 0 or n % (i + 2) == 0:
			return False
	return True

def solve():
	(n, w) = mint()
	arr = intl()
	big = 0
	small = 0
	ssum = 0
	ans = []
	ibig = None
	for i in range(n):
		if arr[i] > w:
			continue
		elif ceil(w / 2) <= arr[i] <= w:
			big += 1
			ibig = i + 1
		else:
			ans.append(i + 1)
			small += 1
			ssum += arr[i]
			if ceil(w / 2) <= ssum <= w:
				print(len(ans))
				print(*ans)
				return
	if big > 0:
		print(1)
		print(ibig)
	elif (w + 1) // 2 <= ssum:
		print(len(ans))
		print(*ans)
	else:
		print(-1)
start_time = time.time()
for _ in range(iinp()):
	solve()


from math import ceil

def Knapsack(n, W, L):
	ListOfelements = []
	SumListOfelements = 0
	for i in range(n):
		if L[i] > W:
			pass
		elif ceil(W / 2) <= L[i] <= W:
			ListOfelements = [i + 1]
			return ListOfelements
		else:
			ListOfelements += [i + 1]
			SumListOfelements += L[i]
			if SumListOfelements >= ceil(W / 2):
				return ListOfelements
	ListOfelements = [-1]
	return ListOfelements
t = int(input())
for i in range(t):
	(n, W) = map(int, input().split())
	L = list(map(int, input().split()))
	if Knapsack(n, W, L) == [-1]:
		print(-1)
	else:
		print(len(Knapsack(n, W, L)))
		print(*list(Knapsack(n, W, L)), sep=' ')


def answer():
	ans = []
	l = w // 2 + (w & 1)
	s = 0
	for x in a:
		if s + x[0] <= w:
			s += x[0]
			ans.append(x[1] + 1)
	if s < l:
		return [-1]
	print(len(ans))
	return ans
for T in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	a = [[a[i], i] for i in range(n)]
	a.sort(key=lambda x: x[0], reverse=True)
	print(*answer())


from math import ceil
for x in range(int(input())):
	(n, w) = map(int, input().split())
	weights = list(map(int, input().split()))
	kek = ceil(w / 2)
	ans = []
	bag = 0
	for i in range(n):
		if weights[i] <= w:
			if weights[i] >= kek:
				ans = [i + 1]
				bag = weights[i]
				break
			else:
				ans.append(i + 1)
				bag += weights[i]
				if bag >= kek:
					break
	if bag >= kek:
		print(len(ans))
		print(' '.join((str(i) for i in ans)))
	else:
		print(-1)


import math
for i in range(int(input())):
	(n, w) = map(int, input().split())
	d = list(map(int, input().split()))
	index = []
	bagw = 0
	for i in range(n):
		if d[i] <= w and d[i] >= math.ceil(w / 2):
			index = [i + 1]
			bagw = d[i]
			break
		elif bagw + d[i] <= w:
			index.append(i + 1)
			bagw += d[i]
	if bagw >= math.ceil(w / 2):
		print(len(index))
		print(*index)
	else:
		print('-1')


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	array = []
	j = 1
	for i in input().split():
		array.append([int(i), j])
		j += 1
	array.sort(reverse=True)
	ans = []
	weg = 0
	atleast = 0
	if w % 2 == 0:
		atleast = w // 2
	else:
		atleast = w // 2 + 1
	for i in array:
		if weg + i[0] <= w:
			weg += i[0]
			ans.append(i[1])
			if weg >= atleast:
				print(len(ans))
				print(*ans)
				break
	else:
		print(-1)


import math
t = int(input())
for i in range(t):
	(n, W) = map(int, input().split())
	num = list(map(int, input().split()))
	P = math.ceil(W / 2)
	index = 0
	answer = ''
	C = 0
	S = 0
	valid = 1
	V = 1
	while index < n and V:
		if num[index] <= W and num[index] >= P:
			answer = index + 1
			C = 1
			print(C)
			print(answer)
			valid = 0
			V = 0
		elif num[index] < W:
			S += num[index]
			answer += str(index + 1) + ' '
			C += 1
			if S <= W and S >= P:
				print(C)
				print(answer)
				valid = 0
				V = 0
		index += 1
	if valid:
		print(-1)


from sys import stdin, stdout
from math import ceil, floor, sqrt, log, log2, log10
from collections import Counter
input = stdin.readline

def solve():
	pass
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	items = []
	for i in range(n):
		items.append([arr[i], i + 1])
	items.sort()
	total = 0
	output = []
	for i in range(n - 1, -1, -1):
		if total + items[i][0] <= w:
			total += items[i][0]
			output.append(items[i][1])
	output.sort()
	if len(output) > 0 and total >= ceil(w / 2):
		print(len(output))
		print(*output)
	else:
		print(-1)


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	k = list(map(int, input().split()))
	l = list()
	for (i, j) in enumerate(k):
		l.append((j, i + 1))
	sm = 0
	ans = list()
	for i in sorted(l, reverse=True):
		if sm + i[0] <= m:
			sm += i[0]
			ans.append(i[1])
	if sm >= (m + 1) // 2:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


import math
for _ in range(int(input())):
	(n, w) = list(map(int, input().split()))
	l = list(map(int, input().split()))
	if min(l) > w:
		print(-1)
	elif w in l:
		print(1)
		print(l.index(w) + 1)
	else:
		l = [[l[i], i + 1] for i in range(n)]
		l.sort(key=lambda x: x[0], reverse=True)
		ans = []
		s = 0
		i = 0
		y = 0
		f = 0
		while i < n:
			s = l[i][0] + s
			ans.append(l[i])
			if math.ceil(w / 2) <= s and s <= w:
				f = 1
				break
			while w < s:
				s = s - ans[y][0]
				y = y + 1
			i = i + 1
		if f == 0:
			print(-1)
		else:
			print(len(ans) - y)
			for i in range(y, len(ans)):
				print(ans[i][1], end=' ')


from math import ceil
for _ in range(int(input())):
	(n, W) = list(map(int, input().split(' ')))
	w = list(enumerate(map(int, input().split(' ')), 1))
	w.sort(key=lambda x: x[1])
	indicies = []
	small_sum = 0
	for (i, wi) in reversed(w):
		if wi > W:
			continue
		elif ceil(W / 2) <= wi <= W:
			small_sum += wi
			indicies.append(i)
			break
		elif wi < ceil(W / 2):
			indicies.append(i)
			small_sum += wi
			if small_sum >= ceil(W / 2):
				break
	if indicies and small_sum >= ceil(W / 2):
		print(len(indicies))
		print(*indicies)
	else:
		print(-1)


t = int(input())
for i in range(0, t):
	(n, w_2) = map(int, input().split())
	N = list(map(int, input().split()))
	w_1 = w_2 // 2 + w_2 % 2
	z = []
	go = True
	for j in range(0, n):
		if N[j] < w_1:
			z.append([N[j], j + 1])
		elif N[j] >= w_1 and N[j] <= w_2:
			print(1)
			print(j + 1)
			go = False
			break
	if go:
		s = 0
		k = 0
		l = ''
		for j in range(0, len(z)):
			s += z[j][0]
			k += 1
			l += str(z[j][1]) + ' '
			if s >= w_1:
				print(k)
				print(l)
				break
		else:
			print(-1)


import math

def knapsack():
	t = int(input())
	for _ in range(t):
		(n, w) = [int(x) for x in input().split(' ')]
		w2 = math.ceil(w / 2)
		items = []
		idx = 0
		for x in input().split(' '):
			idx += 1
			if int(x) <= w:
				items += [(int(x), idx)]
		items.sort(key=lambda x: x[0], reverse=True)
		sum_elems = 0
		found_sol = False
		for x in range(len(items)):
			sum_elems += items[x][0]
			if w2 <= sum_elems <= w:
				found_sol = True
				print(x + 1)
				for k in range(x + 1):
					print(items[k][1], end=' ')
				print()
				break
		if not found_sol:
			print(-1)
knapsack()


t = int(input())
for i in range(t):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	a = [[a[j], j] for j in range(n)]
	a.sort()
	j = 0
	s = 0
	l = (w + 1) // 2
	f = 0
	while j < n:
		if s < l:
			s = s + a[j][0]
			j = j + 1
		if s >= l:
			f = 1
			break
	if f == 1:
		k = 0
		while s > w and k < j:
			s = s - a[k][0]
			k = k + 1
		if s > w or s == 0:
			print(-1)
		else:
			an = []
			l = 0
			for u in range(k, j):
				an.append(a[u][1] + 1)
				l = l + 1
			print(l)
			print(' '.join(map(str, an)))
	else:
		print(-1)


from sys import stdin as stin, stdout as stout, setrecursionlimit as srl
from collections import defaultdict as dd, Counter, deque as dq
import math

def get_ints():
	return map(int, stin.readline().split())

def get_list():
	return list(map(int, stin.readline().split()))

def get_int():
	return int(stin.readline())

def get_str():
	return stin.readline()
for _ in range(get_int()):
	(n, W) = get_ints()
	weights = get_list()
	k = math.ceil(W / 2)
	ll = []
	for (i, c) in enumerate(weights):
		ll.append([c, i])
	ll.sort(key=lambda x: x[0], reverse=True)
	flag = 0
	ind = 0
	for i in range(n):
		if ll[i][0] >= k and ll[i][0] <= W:
			flag = 1
			ind = ll[i][1]
			break
	if flag:
		print(1)
		print(ind + 1)
		continue
	flag = 0
	s = 0
	ans = []
	for i in range(n):
		if ll[i][0] < k:
			s += ll[i][0]
			ans.append(ll[i][1] + 1)
		if s >= k:
			flag = 1
			break
	if flag:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


import sys, os
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict

def solve_(arr, weight):
	arr = sorted([(a, i + 1) for (i, a) in enumerate(arr) if a <= weight])
	required = (weight + 1) // 2
	for (a, i) in arr:
		if a >= required:
			return [i]
	res = []
	cur = 0
	for (a, i) in arr:
		cur += a
		res.append(i)
		if cur >= required:
			return res
	return []

def console(*args):
	print('\x1b[36m', *args, '\x1b[0m', file=sys.stderr)
	pass
ONLINE_JUDGE = False
if os.path.exists('input.txt'):
	ONLINE_JUDGE = True
if ONLINE_JUDGE:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def console(*args):
		pass

def solve(*args):
	if not ONLINE_JUDGE:
		console('----- solving ------')
		console(*args)
		console('----- ------- ------')
	return solve_(*args)
if True:
	inp = iter(sys.stdin.buffer.readlines())
	input = lambda : next(inp)
else:
	input = sys.stdin.buffer.readline
for case_num in range(int(input())):
	(_, limit) = list(map(int, input().split()))
	lst = list(map(int, input().split()))
	res = solve(lst, limit)
	if not res:
		print(-1)
	else:
		print(len(res))
		print(*res)


import math

def main_function():
	test_cases = range(int(input()))
	for test_case in test_cases:
		(n, w) = [int(u) for u in input().split(' ')]
		z = math.ceil(w / 2)
		a = [int(i) for i in input().split(' ')]
		a = [[a[i], i + 1] for i in range(len(a))]
		a.sort(key=lambda x: x[0])
		a.reverse()
		c = 0
		collector = []
		for i in range(len(a)):
			if a[i][0] <= w:
				collector.append(a[i][1])
				w -= a[i][0]
				c += a[i][0]
		if z <= c:
			print(len(collector))
			print(' '.join([str(y) for y in collector]))
		else:
			print(-1)
main_function()


for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	l = []
	var = 0
	cnt = 0
	ans = []
	for j in range(0, n):
		cnt += w[j]
		if cnt <= W:
			ans.append(j + 1)
		elif W >= w[j] >= (W + 1) // 2:
			var = 1
			print(1)
			print(j + 1)
			break
		else:
			cnt -= w[j]
	if var == 0:
		if cnt >= (W + 1) // 2 and len(ans) != 0:
			print(len(ans))
			print(*ans)
		else:
			print(-1)


t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	w = (m + 1) // 2
	sm = 0
	cnt = 0
	v = []
	for i in range(n):
		if a[i] >= w and a[i] <= m:
			print(1)
			print(i + 1)
			break
		elif a[i] < w:
			v.append(i + 1)
			sm += a[i]
			cnt += 1
		if sm >= w and sm <= m:
			print(cnt)
			for j in v:
				print(j, end=' ')
			break
	else:
		print(-1)


R = lambda : map(int, input().split())
(t,) = R()
for _ in [0] * t:
	(n, w) = R()
	r = []
	i = s = 0
	for x in R():
		i += 1
		if 2 * x < w:
			r += (i,)
			s += x
		elif x <= w:
			print(1, i)
			break
		if 2 * s >= w:
			print(len(r), *r)
			break
	else:
		print(-1)


from itertools import product
import itertools
import sys
import heapq
from collections import deque
MOD = 1000000000007

def find(parent, i):
	if parent[i] != i:
		parent[i] = find(parent, parent[i])
	return parent[i]

def union(parent, rank, xx, yy):
	x = find(parent, xx)
	y = find(parent, yy)
	if rank[x] > rank[y]:
		parent[y] = x
	elif rank[y] > rank[x]:
		parent[x] = y
	else:
		parent[y] = x
		rank[x] += 1
ans = 0
K = int(sys.stdin.readline().strip())
for testj in range(K):
	WK = sys.stdin.readline().strip().split()
	W = int(WK[1])
	l = list(map(int, sys.stdin.readline().strip().split()))
	ll = []
	kk = 0
	for i in range(len(l)):
		if l[i] <= W:
			ll.append((l[i], i + 1))
			kk += l[i]
	ll.sort()
	if len(ll) == 1:
		if ll[0][0] * 2 >= W and ll[0][0] <= W:
			print('1')
			print(ll[0][1])
		else:
			print('-1')
	elif kk * 2 < W:
		print('-1')
	else:
		F = False
		for i in range(len(ll)):
			if ll[i][0] <= W and ll[i][0] * 2 >= W:
				F = True
				print('1')
				print(str(ll[i][1]))
				break
		if not F:
			F = False
			k = 0
			ans = []
			for i in range(len(ll)):
				k += ll[i][0]
				ans.append(str(ll[i][1]))
				if k * 2 >= W:
					if k <= W:
						print(len(ans))
						print(' '.join(ans))
						F = True
						break
					else:
						print(k, W)
						print('-1')
						F = True
						break
			if not F:
				print('-1')


import math, sys
from collections import defaultdict, deque
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')

def I():
	return int(sys.stdin.readline())

def In():
	return map(int, sys.stdin.readline().split())

def Sn():
	return sys.stdin.readline().strip()

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		(n, w) = In()
		l = list(In())
		ans = []
		su = 0
		w1 = math.ceil(w / 2)
		for i in range(n):
			if l[i] >= w1 and l[i] <= w:
				su = l[i]
				ans.clear()
				ans.append(i + 1)
				break
			elif su + l[i] <= w:
				su += l[i]
				ans.append(i + 1)
				if su >= w1:
					break
		if su >= w1 and su <= w:
			print(len(ans))
			print(*ans)
		else:
			print(-1)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	b = []
	for i in range(n):
		if a[i] >= (w + 1) // 2:
			if a[i] <= w:
				print(1)
				print(i + 1)
				break
		else:
			b.append([a[i], i + 1])
	else:
		b.sort(reverse=True)
		if b != []:
			x = b[0][0]
			for i in range(1, len(b)):
				x += b[i][0]
				if x >= (w + 1) // 2:
					print(i + 1)
					for j in range(i + 1):
						print(b[j][1], end=' ')
					print()
					break
			else:
				print(-1)
		else:
			print(-1)


for _ in range(int(input())):
	(n, m) = map(int, input().split())
	l = list(map(int, input().split()))
	t = sum(l)
	min_reqd = (m + 1) // 2
	k = min(l)
	r = False
	for i in range(n):
		if min_reqd <= l[i] <= m:
			print(1)
			print(i + 1)
			r = True
			break
	if not r:
		i = 0
		ans = 0
		idx = []
		wt = 0
		while i < n:
			if l[i] > m:
				i += 1
				continue
			if wt + l[i] <= m:
				ans += 1
				wt += l[i]
				idx.append(i + 1)
				if min_reqd <= wt <= m:
					r = True
					break
			i += 1
		if r:
			print(ans)
			print(*idx)
		else:
			print(-1)


t = int(input())
for i in range(t):
	found = False
	x = input().split()
	n = int(x[0])
	W = int(x[1])
	M = W // 2
	if W % 2 == 1:
		M += 1
	x = input().split()
	w = []
	for j in range(n):
		v = int(x[j])
		if v <= W:
			if v >= M:
				print(1)
				print(j + 1)
				found = True
				break
			w.append((v, j + 1))
	if not found:
		n = len(w)
		sw = 0
		a = []
		j = 0
		while j < n and sw < M:
			sw += w[j][0]
			a.append(w[j][1])
			j += 1
		if sw >= M:
			print(len(a))
			for j in range(len(a) - 1):
				print(a[j], end=' ')
			print(a[len(a) - 1])
		else:
			print(-1)


import bisect
t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split())
	(*w,) = map(int, input().split())
	wi = [(wj, j) for (j, wj) in enumerate(w)]
	w.sort()
	wi.sort()
	i = bisect.bisect_left(w, (m + 1) // 2)
	j = bisect.bisect_right(w, m)
	if j - i:
		print(1)
		print(wi[i][1] + 1)
		continue
	sw = sum(w[:i])
	if sw < (m + 1) // 2:
		print(-1)
	else:
		sm = 0
		for x in range(i):
			sm += w[x]
			if sm >= (m + 1) // 2:
				print(x + 1)
				ans = [j + 1 for (wj, j) in wi[:x + 1]]
				print(*ans)
				break


from math import ceil
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	l1 = []
	d1 = ceil(w / 2)
	if sum(l) < d1 or min(l) > w:
		print(-1)
	else:
		f = False
		for i in range(n):
			if d1 <= l[i] <= w:
				print(1)
				print(i + 1)
				f = True
				break
		if f:
			continue
		i = 0
		knap = 0
		while knap < d1 and i < n:
			if l[i] < d1:
				knap += l[i]
				l1.append(i + 1)
			i += 1
		if knap >= d1:
			print(len(l1))
			print(*l1)
		else:
			print(-1)


a = int(input())
for i in range(a):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	d = dict()
	for i in arr:
		d[i] = set()
	for i in range(0, len(arr)):
		d[arr[i]].add(i)
	arr.sort()
	brr = []
	k = 0
	t = -1
	for i in arr:
		if i < w / 2:
			brr.append(i)
		elif i >= w / 2 and i <= w:
			k = 1
			t = i
			break
		else:
			break
	s = set()
	if k == 1:
		print(1)
		print(d[t].pop() + 1)
	else:
		ans = []
		summ = 0
		for i in brr:
			summ = summ + i
			ans.append(i)
			if summ >= w / 2:
				break
		if summ < w / 2:
			print(-1)
		else:
			fans = []
			for i in ans:
				fans.append(d[i].pop() + 1)
			print(len(fans))
			print(' '.join(map(str, fans)))


import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def solve():
	for _ in range(inp()):
		(n, w) = invr()
		weights = inlt()
		sweights = sorted(weights)[::-1]
		inds = {ww: [] for ww in set(sweights)}
		for i in range(len(weights)):
			inds[weights[i]].append(i)
		ans = []
		cur = 0
		target = w // 2 if w % 2 == 0 else 1 + w // 2
		for x in sweights:
			aa = cur + x
			if aa <= w:
				cur = aa
				ans.append(inds[x].pop() + 1)
			if cur >= target:
				print(len(ans))
				print(*ans)
				break
		else:
			print(-1)
solve()


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	for _ in range(int(input())):
		(n, w) = map(int, input().split(' '))
		a = list(map(int, input().split(' ')))
		weights = []
		half = math.ceil(w / 2)
		for x in range(n):
			weights.append([a[x], x + 1])
		weights.sort(reverse=True)
		currsum = 0
		ans = []
		for x in range(n):
			if currsum >= half:
				break
			if currsum + weights[x][0] <= w:
				currsum += weights[x][0]
				ans.append(weights[x][1])
		if currsum >= half and currsum <= w:
			print(len(ans))
			print(*ans)
		else:
			print(-1)
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')
main()


def exgcd(a, b):
	if not b:
		return (1, 0)
	(y, x) = exgcd(b, a % b)
	y -= a // b * x
	return (x, y)

def getinv(a, m):
	(x, y) = exgcd(a, m)
	return --1 if x == 1 else x % m

def comb(n, b):
	res = 1
	b = min(b, n - b)
	for i in range(b):
		res = res * (n - i) * getinv(i + 1, mo) % mo
	return res % mo
t = int(input())
for ti in range(t):
	(n, w) = map(int, input().split())
	li = [(int(i), p) for (p, i) in enumerate(input().split())]
	li.sort(reverse=True)
	ans = []
	c = 0
	valid = False
	for (a, b) in li:
		if c + a <= w:
			c += a
			ans.append(b + 1)
		if 2 * c >= w:
			valid = True
			break
	if valid:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


from collections import defaultdict
from math import ceil

def main(n, W, w):
	target = ceil(W / 2)
	sorted_list = sorted(enumerate(w, 1), key=lambda x: x[1])
	count = 0
	for (i, x) in enumerate(sorted_list, 1):
		if x[1] > W:
			pass
		elif x[1] >= target:
			return (1, [x[0]])
		else:
			count += x[1]
			if count > W:
				count = 0
			elif count >= target:
				return (i, [z[0] for z in sorted_list[:i]])
	return (-1, [])
t = int(input())
for i in range(1, t + 1):
	(n, W) = [int(s) for s in input().split(' ')]
	w = [int(s) for s in input().split(' ')]
	(status, li) = main(n, W, w)
	if status == -1:
		print(-1)
	else:
		print(status)
		print(*li)


import math
for i in range(int(input())):
	a = [int(j) for j in input().split()]
	n = a[0]
	w = a[1]
	check = 0
	b = []
	sum = 0
	len = 0
	x = math.ceil(w / 2)
	a = [int(j) for j in input().split()]
	for j in range(n):
		if a[j] < x:
			b.append(j + 1)
			sum += a[j]
			len += 1
			if sum >= x:
				print(len)
				print(*b)
				check = 1
				break
		elif x <= a[j] <= w:
			print(1)
			print(j + 1)
			check = 1
			break
	if check == 0:
		print(-1)


import sys
input = sys.stdin.readline
for nt in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	s = 0
	b = []
	for i in range(n):
		if (w + 1) // 2 <= a[i] <= w:
			print(1)
			print(i + 1)
			break
		elif a[i] < (w + 1) // 2:
			s += a[i]
			b.append(i + 1)
			if s >= (w + 1) // 2:
				print(len(b))
				print(*b)
				break
	else:
		print(-1)


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	arr = [e for e in map(int, input().split())]
	for i in range(n):
		arr[i] = (arr[i], i + 1)
	arr = [e for e in arr if e[0] <= w]
	arr.sort()
	arr.reverse()
	res = []
	acc = 0
	for (e, i) in arr:
		acc += e
		res.append(i)
		if acc * 2 >= w and acc <= w:
			break
	if acc * 2 < w:
		print(-1)
	else:
		print(len(res))
		print(*res)


import math
t = int(input())

def solve(n, w, items):
	w_half = math.ceil(w / 2)
	items = list(zip(items, [i for i in range(1, n + 1)]))
	items.sort()
	s = 0
	j = -1
	while items and items[-1][0] > w:
		items.pop()
	if items:
		if items[-1][0] >= w_half:
			print(1)
			print(items[-1][1])
			return
		for i in items:
			s += i[0]
			j += 1
			if s >= w_half:
				break
		if s > w or s < w_half:
			print(-1)
		else:
			print(j + 1)
			print(' '.join([str(x[1]) for x in items[:j + 1]]))
	else:
		print(-1)
for _ in range(t):
	(n, w) = list(map(int, input().split()))
	items = list(map(int, input().split()))
	solve(n, w, items)


import math
t = int(input())
for _ in range(t):
	(n, m) = map(int, input().split())
	l = list(map(int, input().split()))
	val = math.ceil(m / 2)
	(f, s, ans) = (False, 0, [])
	for i in range(n):
		if val <= l[i] <= m:
			ans = [i + 1]
			f = True
			break
		elif l[i] < val:
			s += l[i]
			ans.append(i + 1)
			if s >= val:
				f = True
				break
	if f:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l = [int(i) for i in input().split()]
	p = sorted([(l[i], i + 1) for i in range(n)])
	(s, res, stops) = (0, [], False)
	for k in p:
		s += k[0]
		res += [k[1]]
		if w / 2 <= s and s <= w:
			break
		if s > w:
			if w / 2 <= k[0] <= w:
				res = [k[1]]
				s = k[0]
				break
			else:
				s = float('inf')
				res = []
				break
	if len(res) == 0 or not w / 2 <= s <= w:
		print(-1)
	else:
		print(len(res))
		print(*res, sep=' ')


import math
(t, I) = (int(input()), lambda : map(int, input().split()))
for i in range(t):
	(n, w) = I()
	v = {index + 1: int(value) for (index, value) in enumerate(input().split())}
	v = sorted(v.items(), key=lambda x: x[1], reverse=True)
	if all((value > w for (index, value) in v)):
		print(-1)
	else:
		flag = False
		s = 0
		indexl = []
		for (index, value) in v:
			if value > w:
				continue
			elif s + value >= math.ceil(w / 2) and s + value <= w:
				flag = True
				indexl.append(index)
				s = s + value
				print(len(indexl))
				print(*indexl)
				break
			elif s + value < math.ceil(w / 2):
				indexl.append(index)
				s = s + value
			if flag:
				break
		if not flag:
			print(-1)


for i in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	d = {}
	for i in range(n):
		d[a[i]] = []
	for i in range(n):
		d[a[i]].append(i + 1)
	a.sort()
	x = 0
	s = 0
	while x < n:
		s += a[x]
		if s >= (w + 1) // 2:
			break
		x += 1
	ans = []
	if x == n:
		print(-1)
	else:
		j = 0
		while s > w and j < x:
			s -= a[j]
			j += 1
		if s > w:
			print(-1)
			continue
		for i in range(j, x + 1):
			if len(d[a[i]]):
				ans.append(d[a[i]].pop())
		ans.sort()
		print(len(ans))
		print(*ans)


import os, sys
from io import BytesIO, IOBase
from math import ceil

class Node:

	def __init__(self, val, ind):
		self.val = val
		self.ind = ind

	def __lt__(self, other):
		return self.val < other.val

def main():
	for _ in range(int(input())):
		(n, W) = map(int, input().split())
		w1 = list(map(int, input().split()))
		w = []
		for (ind, i) in enumerate(w1):
			w.append(Node(i, ind))
		w.sort()
		su = 0
		fl = 0
		inde = 0
		for i in range(n):
			su += w[i].val
			if int(ceil(W / 2)) <= su <= W:
				fl = 1
				inde = i
				break
			if su > W:
				inde = i
				fl = 2
				break
		if not fl:
			print(-1)
		elif fl == 1:
			print(inde + 1)
			for i in range(inde + 1):
				print(w[i].ind + 1, end=' ')
			print('')
		elif int(ceil(W / 2)) <= w[inde].val <= W:
			print(1)
			print(w[inde].ind + 1)
		else:
			print(-1)
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')
main()


from sys import stdin, gettrace
if gettrace():
	inputi = input
else:

	def input():
		return next(stdin)[:-1]

	def inputi():
		return stdin.buffer.readline()

def solve():
	(n, tw) = map(int, inputi().split())
	ww = list(enumerate([int(a) for a in inputi().split()], 1))
	ww.sort(reverse=True, key=lambda w: w[1])
	res = []
	sum = 0
	for (i, w) in ww:
		if w <= tw:
			res.append(i)
			sum += w
			if sum >= tw / 2:
				break
	else:
		print(-1)
		return
	print(len(res))
	print(' '.join(map(str, res)))

def main():
	t = int(inputi())
	for _ in range(t):
		solve()
main()


from collections import *
from operator import itemgetter, attrgetter
from decimal import *
import bisect
import math
import heapq as hq
MOD = 10 ** 9 + 7

def pow(a, b, m):
	ans = 1
	while b:
		if b & 1:
			ans = ans * a % m
		b //= 2
		a = a * a % m
	return ans
vis = []
graph = []

def dfs(v):
	if vis[v]:
		return 0
	vis[v] = True
	temp = 0
	for vv in graph[v]:
		temp += dfs(vv)
	return 1 + temp

def ispalindrome(s):
	if s[:] == s[::-1]:
		return 1
	return 0
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	x = math.ceil(w / 2)
	l = list(map(int, input().split()))
	t = []
	for i in range(n):
		t.append([l[i], i + 1])
	t.sort(reverse=True)
	c = 0
	ans = []
	for i in range(n):
		if c + t[i][0] <= w:
			c += t[i][0]
			ans.append(t[i][1])
		if c >= x:
			break
	if c >= x and c <= w:
		ans.sort()
		print(len(ans))
		print(*ans)
	else:
		print(-1)


i = lambda : map(int, input().split())
for _ in range(int(input())):
	(n, w) = i()
	a = list(i())
	a = sorted(list(zip(a, range(1, n + 1))), reverse=True)
	b = []
	c = 0
	for x in a:
		if c + x[0] <= w:
			c += x[0]
			b.append(x[1])
	if c >= (w + 1) // 2:
		print(len(b))
		print(*b)
	else:
		print('-1')


import sys

def ceil(a, b):
	return -(-a // b)

def answer(n, W, w):
	tup_list = []
	for i in range(n):
		tup_list.append((i + 1, w[i]))
	tup_list.sort(key=lambda tup: tup[1], reverse=True)
	indx = 10 ** 10
	for i in range(n):
		if tup_list[i][1] > W:
			continue
		elif tup_list[i][1] >= ceil(W, 2):
			print('1')
			print(tup_list[i][0])
			return
		else:
			indx = i
			break
	if indx == 10 ** 10:
		print('-1')
		return
	summ = tup_list[indx][1]
	addrs = [tup_list[indx][0]]
	for i in range(indx + 1, n):
		summ += tup_list[i][1]
		addrs.append(tup_list[i][0])
		if summ >= ceil(W, 2):
			print(i - indx + 1)
			print(' '.join(map(str, addrs)))
			return
	print('-1')
	return

def main():
	t = int(input())
	while t:
		(n, W) = [int(i) for i in sys.stdin.readline().split()]
		w = [int(i) for i in sys.stdin.readline().split()]
		answer(n, W, w)
		t -= 1
	return
main()


import sys
input = sys.stdin.buffer.readline

def solution():
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	y = 0
	if w % 2 != 0:
		y = 1
	if min(l) > w or sum(l) < w // 2 + y:
		print(-1)
	else:
		s = 0
		x = []
		for i in range(n):
			x.append([l[i], i])
		x.sort(reverse=True)
		ans = []
		for i in range(n):
			if s + x[i][0] <= w:
				s += x[i][0]
				ans.append(x[i][1] + 1)
		if s >= w // 2 + y and s <= w:
			print(len(ans))
			print(*ans)
		else:
			print(-1)
t = int(input())
for _ in range(t):
	solution()


from sys import stdin, stdout, exit

def INI():
	return int(stdin.readline())

def INL():
	return [int(_) for _ in stdin.readline().split()]

def INS():
	return stdin.readline()

def MOD():
	return pow(10, 9) + 7

def OPS(ans):
	stdout.write(str(ans) + '\n')

def OPL(ans):
	[stdout.write(str(_) + ' ') for _ in ans]
	stdout.write('\n')
from bisect import bisect_left

def fun():
	i = bisect_left(Y, (W + 1) // 2)
	if i != n and (W + 1) // 2 <= Y[i] <= W:
		OPS(1)
		OPS(D[Y[i]][0] + 1)
		return True
for _ in range(INI()):
	(n, W) = INL()
	X = INL()
	Y = sorted(X)
	D = dict()
	s = 0
	m = float('inf')
	for _ in range(n):
		if X[_] in D:
			D[X[_]].append(_)
		else:
			D[X[_]] = [_]
		s += X[_]
		m = min(m, X[_])
	if s < (W + 1) // 2 or W < m:
		OPS(-1)
	elif fun():
		pass
	else:
		x = 0
		ANS = []
		for _ in range(n):
			if X[_] <= W // 2:
				ANS.append(_ + 1)
				x += X[_]
				if (W + 1) // 2 <= x <= W:
					OPS(len(ANS))
					OPL(sorted(ANS))
					break
		else:
			OPS(-1)


for _ in range(int(input())):
	(n, W) = map(int, input().split())
	W_half = (W + 1) // 2
	sol = []
	sol_sum = 0
	impossible = True
	for (i, w) in enumerate([int(w) for w in input().split()]):
		if w > W:
			continue
		if w >= W_half:
			impossible = False
			print(1)
			print(i + 1)
			break
		sol_sum += w
		sol.append(i + 1)
		if sol_sum >= W_half:
			impossible = False
			print(len(sol))
			print(' '.join([str(x) for x in sol]))
			break
	if impossible:
		print(-1)


import math
for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	nw = [(w[z], z) for z in range(n)]
	nw.sort(reverse=True, key=lambda x: x[0])
	ps = 0
	ans = []
	c = 0
	l = 0
	i = math.ceil(W / 2)
	for z in range(n):
		if ps + nw[z][0] <= W:
			ps += nw[z][0]
			ans.append(nw[z][1] + 1)
			l += 1
		if ps >= i:
			c = 1
			break
	if not c:
		print(-1)
	else:
		print(l)
		print(*ans)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	tmp = 0
	res = []
	for i in range(n):
		if 2 * w[i] >= W and w[i] <= W:
			res = [i + 1]
			print(1)
			print(i + 1)
			break
		elif w[i] <= W:
			tmp += w[i]
			res.append(i + 1)
			if 2 * tmp >= W:
				print(len(res))
				print(*res)
				break
	else:
		print(-1)


import sys, os
from math import sqrt, gcd, ceil, log, floor
from bisect import bisect, bisect_left
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
from itertools import permutations
input = sys.stdin.readline
read = lambda : list(map(int, input().strip().split()))
MOD = 10 ** 9 + 7

def main():
	ans = ''
	for _ in range(int(input())):
		(n, w) = read()
		arr = read()
		c = ceil(w / 2)
		arr2 = [(arr[i], i) for i in range(n)]
		arr2.sort()
		arr.sort()
		ind = bisect(arr, c)
		k = 0
		if ind < n:
			if c <= arr[ind - 1] <= w:
				k = ind + (n == 1)
				v = arr[ind - 1]
			elif c <= arr[ind] <= w:
				k = ind + 1
				v = arr[ind]
		if k:
			for i in arr2:
				if i[0] == v:
					ans += '1\n' + str(i[1] + 1) + '\n'
					break
			continue
		s = 0
		lis = []
		fl = 0
		for (elem, i) in arr2:
			s += elem
			lis.append(i + 1)
			if c <= s <= w:
				fl = 1
				break
			elif s > w:
				break
		if fl:
			ans += str(len(lis)) + '\n'
			ans += ' '.join(map(str, lis)) + '\n'
		else:
			ans += '-1\n'
	print(ans)
main()


def solve(n, w, arr):
	arr = list(enumerate(arr))
	arr.sort(key=lambda x: x[1])
	left = (w + 1) // 2
	ans = []
	for i in range(n - 1, -1, -1):
		if arr[i][1] > w:
			continue
		if left <= arr[i][1] and arr[i][1] <= w:
			sum_ = 0
			for j in range(i, n):
				if sum_ + arr[j][1] > w:
					break
				ans.append(str(arr[j][0] + 1))
				sum_ += arr[j][1]
			print(len(ans))
			print(' '.join(ans))
			return
		left -= arr[i][1]
	print(-1)

def main():
	t = int(input())
	for _ in range(t):
		(n, w) = [int(word) for word in input().rstrip().split()]
		ws = [int(word) for word in input().rstrip().split()]
		solve(n, w, ws)
main()


for t in range(int(input())):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	c = 0
	x = [[l[i], i + 1] for i in range(n)]
	x.sort(key=lambda a: a[0], reverse=True)
	ans = []
	for i in range(n):
		if c + x[i][0] <= w:
			c += x[i][0]
			ans.append(x[i][1])
	if c < (w + 1) // 2:
		print('-1')
	else:
		print(len(ans))
		print(*ans)


casos = int(input())
for x in range(casos):
	(n, w) = list(map(int, input().split()))
	band = 0
	numeros = list(map(int, input().split()))
	q = 0
	s = 0
	dentro = []
	for d in range(n):
		if numeros[d] <= w:
			if s + numeros[d] > w and numeros[d] * 2 < w:
				continue
			else:
				if numeros[d] * 2 >= w:
					q = d + 1
					band = 1
					break
				dentro.append(d + 1)
				s = s + numeros[d]
	if band == 0:
		if len(dentro) != 0 and s * 2 >= w and (s <= w):
			print(len(dentro))
			saida = ''
			for y in dentro:
				saida += str(y) + ' '
			print(saida)
		else:
			print('-1')
		continue
	else:
		print('1')
		print(q)
		continue


from __future__ import division, print_function
import math
import os
import sys
from fractions import *
from sys import *
from decimal import *
from io import BytesIO, IOBase
from itertools import *
from collections import *
M = 10 ** 9 + 7
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def regularbracket(t):
	p = 0
	for i in t:
		if i == '(':
			p += 1
		else:
			p -= 1
		if p < 0:
			return False
	else:
		if p > 0:
			return False
		else:
			return True

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] <= key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def reverse1(string):
	pp = ''
	for i in string[::-1]:
		pp += i
	if pp == string:
		return True
	return False

def reverse2(list1):
	l = []
	for i in list1[::-1]:
		l.append(i)
	if l == list1:
		return True
	return False

def mex(list1):
	p = max(list1) + 1
	for i in range(len(list1)):
		if list1[i] != i:
			p = i
			break
	return p

def sumofdigits(n):
	n = str(n)
	s1 = 0
	for i in n:
		s1 += int(i)
	return s1

def perfect_square(n):
	s = math.sqrt(n)
	if s == int(s):
		return True
	return False

def roman_number(x):
	if x > 15999:
		return
	value = [5000, 4000, 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
	symbol = ['F', 'MF', 'M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
	roman = ''
	i = 0
	while x > 0:
		div = x // value[i]
		x = x % value[i]
		while div:
			roman += symbol[i]
			div -= 1
		i += 1
	return roman

def soretd(s):
	for i in range(1, len(s)):
		if s[i - 1] > s[i]:
			return False
	return True

def countRhombi(h, w):
	ct = 0
	for i in range(2, h + 1, 2):
		for j in range(2, w + 1, 2):
			ct += (h - i + 1) * (w - j + 1)
	return ct

def countrhombi2(h, w):
	return h * h // 4 * (w * w // 4)

def binpow(a, b):
	if b == 0:
		return 1
	else:
		res = binpow(a, b // 2)
	if b % 2 != 0:
		return res * res * a
	else:
		return res * res

def binpowmodulus(a, b, m):
	a %= m
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % m
		a = a * a % m
		b >>= 1
	return res

def coprime_to_n(n):
	result = n
	i = 2
	while i * i <= n:
		if n % i == 0:
			while n % i == 0:
				n //= i
			result -= result // i
		i += 1
	if n > 1:
		result -= result // n
	return result

def prime(x):
	if x == 1:
		return False
	else:
		for i in range(2, int(math.sqrt(x)) + 1):
			if x % i == 0:
				return False
		else:
			return True

def luckynumwithequalnumberoffourandseven(x, n, a):
	if x >= n and str(x).count('4') == str(x).count('7'):
		a.append(x)
	elif x < 1000000000000.0:
		luckynumwithequalnumberoffourandseven(x * 10 + 4, n, a)
		luckynumwithequalnumberoffourandseven(x * 10 + 7, n, a)
	return a

def luckynuber(x, n, a):
	p = set(str(x))
	if len(p) <= 2:
		a.append(x)
	if x < n:
		luckynuber(x + 1, n, a)
	return a

def interact(type, x):
	if type == 'r':
		inp = input()
		return inp.strip()
	else:
		print(x, flush=True)

def findTrailingZeros(n):
	count = 0
	while n >= 5:
		n //= 5
		count += n
	return count

def mergeSort(arr):
	if len(arr) > 1:
		mid = len(arr) // 2
		L = arr[:mid]
		R = arr[mid:]
		mergeSort(L)
		mergeSort(R)
		i = j = k = 0
		while i < len(L) and j < len(R):
			if L[i] < R[j]:
				arr[k] = L[i]
				i += 1
			else:
				arr[k] = R[j]
				j += 1
			k += 1
		while i < len(L):
			arr[k] = L[i]
			i += 1
			k += 1
		while j < len(R):
			arr[k] = R[j]
			j += 1
			k += 1
res = set()

def solven(p, l, a, b, n):
	if p > n or l > 10:
		return
	if p > 0:
		res.add(p)
	solven(p * 10 + a, l + 1, a, b, n)
	solven(p * 10 + b, l + 1, a, b, n)

def subsetsUtil(A, subset, index, d):
	print(*subset)
	s = sum(subset)
	d.append(s)
	for i in range(index, len(A)):
		subset.append(A[i])
		subsetsUtil(A, subset, i + 1, d)
		subset.pop(-1)
	return d

def subsetSums(arr, l, r, d, sum=0):
	if l > r:
		d.append(sum)
		return
	subsetSums(arr, l + 1, r, d, sum + arr[l])
	subsetSums(arr, l + 1, r, d, sum)
	return d

def print_factors(x):
	factors = []
	for i in range(1, x + 1):
		if x % i == 0:
			factors.append(i)
	return factors

def calc(X, d, ans, D):
	if len(X) == 0:
		return
	i = X.index(max(X))
	ans[D[max(X)]] = d
	Y = X[:i]
	Z = X[i + 1:]
	calc(Y, d + 1, ans, D)
	calc(Z, d + 1, ans, D)

def factorization(n, l):
	c = n
	if prime(n) == True:
		l.append(n)
		return l
	for i in range(2, c):
		if n == 1:
			break
		while n % i == 0:
			l.append(i)
			n = n // i
	return l

def good(b):
	l = []
	i = 0
	while len(b) != 0:
		if b[i] < b[len(b) - 1 - i]:
			l.append(b[i])
			b.remove(b[i])
		else:
			l.append(b[len(b) - 1 - i])
			b.remove(b[len(b) - 1 - i])
	if l == sorted(l):
		return True
	return False

def generate(st, s):
	if len(s) == 0:
		return
	if s not in st:
		st.add(s)
		for i in range(len(s)):
			t = list(s).copy()
			t.remove(s[i])
			t = ''.join(t)
			generate(st, t)
	return

def largestincreasingsubsequence(A):
	l = [1] * len(A)
	sub = []
	for i in range(1, len(l)):
		for k in range(i):
			if A[k] < A[i]:
				sub.append(l[k])
		l[i] = 1 + max(sub, default=0)
	return max(l, default=0)

def findOR(nums, N):
	prefix_sum = 0
	result = 0
	for i in range(N):
		result |= nums[i]
		prefix_sum += nums[i]
		result |= prefix_sum
	return result

def OR(a, n):
	ans = a[0]
	for i in range(1, n):
		ans |= a[i]
	return ans

def main():
	t = inpu()
	for _ in range(t):
		(n, w) = sep()
		arr = lis()
		l = []
		p = 0
		i = 0
		for x in arr:
			i += 1
			if 2 * x < w:
				l.append(i)
				p += x
			elif x <= w:
				print(1)
				print(i)
				break
			if 2 * p >= w:
				print(len(l))
				print(*l)
				break
		else:
			print(-1)
main()


from math import *
t = int(input())
for _ in range(t):
	(n, w) = input().split()
	(ans, b, s) = ([], [], 0)
	(n, w, w2) = (int(n), int(w), (int(w) + 1) // 2)
	a = input()
	a = [int(x) for x in a.split()]
	for i in range(len(a)):
		if a[i] >= w2 and a[i] <= w:
			ans = [i]
			s += a[i]
			break
		if a[i] < w2:
			b.append(i)
	if ans == []:
		for i in b:
			if s + a[i] <= w:
				s += a[i]
				ans.append(i)
	if s >= w2 and s <= w:
		print(len(ans))
		for i in ans:
			print(i + 1, end=' ')
		print()
	else:
		print(-1)


for test in range(int(input())):
	(n, w) = map(int, input().split())
	witgt = list(map(int, input().split()))
	lis = []
	for i in range(n):
		if witgt[i] <= w:
			lis.append([witgt[i], i + 1])
	lis.sort(key=lambda x: x[0])
	lis.reverse()
	h = (w + 1) // 2
	ans = []
	c = 0
	for i in range(len(lis)):
		if c + lis[i][0] <= w:
			c += lis[i][0]
			ans.append(lis[i][1])
	if c < h or len(ans) == 0:
		print(-1)
	else:
		print(len(ans))
		ans.sort()
		print(*ans)


from sys import stdin
from math import ceil

def u():
	return [int(i) for i in next(stdin).split()]
t = int(input())
for _ in range(t):
	(n, W) = u()
	FIXT_W = W
	target = ceil(W / 2)
	l = u()
	filled = 0
	winnerIdxes = []
	count = 0
	s = True
	if W > 2 * 10 ** 14:
		print('-1')
		continue
	for (idx, el) in enumerate(l):
		if el >= target and el <= FIXT_W:
			print('1')
			print(idx + 1)
			s = False
			break
		elif el <= W:
			W -= el
			filled += el
			winnerIdxes.append(idx + 1)
			count += 1
		if filled >= target:
			print(count)
			print(*winnerIdxes)
			s = False
			break
	if s:
		print('-1')


for k in range(int(input())):
	(n, w) = list(map(int, input().split()))
	ls = list(map(int, input().split()))
	nls = [(ls[i], i + 1) for i in range(n)]
	nls = sorted(nls, reverse=True)
	ls = nls
	x = 0
	nls = []
	found = False
	for i in range(n):
		if x + ls[i][0] <= w:
			x += ls[i][0]
			nls.append(ls[i][1])
		if x >= w / 2:
			found = True
			break
	if found:
		print(len(nls))
		print(*nls)
	else:
		print(-1)


from math import ceil
t = int(input())
for _ in range(t):
	(n, m) = list(map(int, input().split()))
	values = list(map(int, input().split()))
	lookup = list(zip(values, range(1, len(values) + 1)))
	l = list(sorted(lookup, key=lambda x: x[0], reverse=True))
	th = ceil(m / 2)
	total = 0
	filled = False
	ans = []
	for (k, v) in l:
		if total + k > m:
			continue
		else:
			total += k
			ans.append(v)
			if total >= th:
				filled = True
				break
	if filled:
		print(str(len(ans)) + '\n' + ' '.join(list(map(str, ans))))
	else:
		print(-1)


import math

def knapsack(arr, n, W):
	C = W
	half = math.ceil(C / 2)
	temp = 0
	ind = []
	for j in range(n):
		if arr[j] >= half and arr[j] <= C:
			ind = [j + 1]
			temp = arr[j]
			break
		else:
			temp += arr[j]
			if temp > C:
				temp -= arr[j]
			else:
				ind.append(j + 1)
				if temp >= half:
					break
	if temp >= half:
		print(len(ind))
		print(*ind)
	else:
		print(-1)
for _ in range(int(input())):
	(n, W) = map(int, input().split())
	arr = [int(x) for x in input().split()]
	knapsack(arr, n, W)


import math

def solve():
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	weight = 0
	index = []
	for i in range(n):
		if math.ceil(W / 2) <= w[i] <= W:
			print(1)
			print(i + 1)
			return
		if weight + w[i] <= W:
			weight += w[i]
			index.append(i + 1)
	if math.ceil(W / 2) <= weight <= W:
		print(len(index))
		print(*index)
	else:
		print('-1')
for _ in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	(ans, s, found) = ([], 0, False)
	c = (w + 1) // 2
	for i in range(n):
		x = a[i]
		if s + x <= w:
			ans.append(i + 1)
			s += x
		if x <= w and x >= c:
			print(1)
			print(i + 1)
			found = True
			break
	if not found and s < c:
		print(-1)
	elif not found:
		print(len(ans))
		for x in ans:
			print(x, end=' ')
		print()


for _ in range(int(input())):
	(n, W) = list(map(int, input().split()))
	ls1 = list(map(int, input().split()))
	idxs = []
	for (idx, v) in enumerate(ls1):
		if v <= W and v >= (W + 1) // 2:
			print('1\n', idx + 1, sep='')
			break
	else:
		w = 0
		ls = sorted([(v, idx + 1) for (idx, v) in enumerate(ls1)])
		for v in ls:
			w += v[0]
			idxs.append(v[1])
			if w >= (W + 1) // 2:
				break
		if w > W or w < (W + 1) // 2:
			print(-1)
		else:
			print(len(idxs))
			for v in idxs:
				print(v, end=' ')
			print('')


import math

def main():
	for case in range(int(input())):
		(n, w) = [int(x) for x in input().split()]
		temp = [int(x) for x in input().split()]
		arr = []
		i = 1
		for x in temp:
			if x <= w:
				arr.append([x, i])
			i += 1
		arr = sorted(arr)[::-1]
		s = 0
		lim = math.ceil(w / 2)
		ans = []
		for x in arr:
			s += x[0]
			ans.append(x[1])
			if s >= lim:
				break
		ans.sort()
		if s >= lim:
			print(len(ans))
			print(*ans)
		else:
			print(-1)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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')
main()


from sys import stdin, stdout
input = stdin.readline
print = lambda x: stdout.write(str(x) + '\n')
for _ in range(int(input())):
	(n, W) = map(int, input().split())
	wt = [(i, j) for (i, j) in enumerate(map(int, input().split()))]
	wt.sort(key=lambda x: x[1])
	while wt and wt[-1][1] > W:
		wt.pop()
	ans = []
	low = (W + 1) // 2
	temp = 0
	while wt:
		(idx, val) = wt.pop()
		temp += val
		ans.append(idx + 1)
		if temp >= low:
			ans.sort()
			print(len(ans))
			ans = ' '.join(map(str, ans))
			print(ans)
			break
	else:
		print(-1)
		continue


t = int(input())
while t > 0:
	t -= 1
	(n, w) = [int(x) for x in input().split()]
	arr = [int(x) for x in input().split()]
	ans = []
	smalltotal = 0
	foundmid = False
	midindex = 0
	mid = w / 2
	for i in range(n):
		if arr[i] < mid:
			if arr[i] + smalltotal <= w:
				ans.append(i)
				smalltotal += arr[i]
		elif arr[i] <= w:
			foundmid = True
			midindex = i
			break
	if foundmid == True:
		print(1)
		print(midindex + 1)
	elif smalltotal >= mid:
		print(len(ans))
		for elements in ans:
			print(elements + 1, end=' ')
		print('')
	else:
		print(-1)


for _ in range(int(input())):
	(n, W) = [int(j) for j in input().split()]
	w = [int(j) for j in input().split()]
	(t, k) = (0, 0)
	lt = []
	for i in range(n):
		t = t + w[i]
		if t <= W:
			lt.append(i + 1)
		elif W >= w[i] >= (W + 1) // 2:
			k = 1
			print(1)
			print(i + 1)
			break
		else:
			t = t - w[i]
	if k == 0:
		if t >= (W + 1) // 2 and len(lt) != 0:
			print(len(lt))
			print(*lt)
		else:
			print(-1)


from collections import defaultdict, OrderedDict, Counter
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
from queue import Queue, PriorityQueue
from heapq import heapify, heappop, heappush
from statistics import median
from math import gcd, sqrt, floor, factorial, ceil, log2, log10
import fractions
import copy
from copy import deepcopy
import sys
sys.setrecursionlimit(10 ** 7)
import math
import os
import bisect
import collections
mod = pow(10, 9) + 7
import random
from random import random, randint, randrange

def ncr(n, r, p=mod):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p
inf = float('inf')
adj = defaultdict(set)
visited = defaultdict(int)

def addedge(a, b):
	adj[a].add(b)
	adj[b].add(a)

def bfs(v):
	q = Queue()
	q.put(v)
	visited[v] = 1
	while q.qsize() > 0:
		s = q.get_nowait()
		print(s)
		for i in adj[s]:
			if visited[i] == 0:
				q.put(i)
				visited[i] = 1

def dfs(v, visited):
	if visited[v] == 1:
		return
	visited[v] = 1
	print(v)
	for i in adj[v]:
		dfs(i, visited)

def reverse_bisect_right(a, x, lo=0, hi=None):
	if lo < 0:
		raise ValueError('lo must be non-negative')
	if hi is None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if x > a[mid]:
			hi = mid
		else:
			lo = mid + 1
	return lo

def reverse_bisect_left(a, x, lo=0, hi=None):
	if lo < 0:
		raise ValueError('lo must be non-negative')
	if hi is None:
		hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if x >= a[mid]:
			hi = mid
		else:
			lo = mid + 1
	return lo

class MaxHeap:

	def __init__(self, maxsize):
		self.maxsize = maxsize
		self.size = 0
		self.Heap = [0] * (self.maxsize + 1)
		self.Heap[0] = sys.maxsize
		self.FRONT = 1

	def parent(self, pos):
		return pos // 2

	def leftChild(self, pos):
		return 2 * pos

	def rightChild(self, pos):
		return 2 * pos + 1

	def isLeaf(self, pos):
		if pos >= self.size // 2 and pos <= self.size:
			return True
		return False

	def swap(self, fpos, spos):
		(self.Heap[fpos], self.Heap[spos]) = (self.Heap[spos], self.Heap[fpos])

	def maxHeapify(self, pos):
		if not self.isLeaf(pos):
			if self.Heap[pos] < self.Heap[self.leftChild(pos)] or self.Heap[pos] < self.Heap[self.rightChild(pos)]:
				if self.Heap[self.leftChild(pos)] > self.Heap[self.rightChild(pos)]:
					self.swap(pos, self.leftChild(pos))
					self.maxHeapify(self.leftChild(pos))
				else:
					self.swap(pos, self.rightChild(pos))
					self.maxHeapify(self.rightChild(pos))

	def insert(self, element):
		if self.size >= self.maxsize:
			return
		self.size += 1
		self.Heap[self.size] = element
		current = self.size
		while self.Heap[current] > self.Heap[self.parent(current)]:
			self.swap(current, self.parent(current))
			current = self.parent(current)

	def Print(self):
		for i in range(1, self.size // 2 + 1):
			print(' PARENT : ' + str(self.Heap[i]) + ' LEFT CHILD : ' + str(self.Heap[2 * i]) + ' RIGHT CHILD : ' + str(self.Heap[2 * i + 1]))

	def extractMax(self):
		popped = self.Heap[self.FRONT]
		self.Heap[self.FRONT] = self.Heap[self.size]
		self.size -= 1
		self.maxHeapify(self.FRONT)
		return popped

def get_list():
	return list(map(int, input().split()))

def get_str_list_in_int():
	return [int(i) for i in list(input())]

def get_str_list():
	return list(input())

def get_map():
	return map(int, input().split())

def input_int():
	return int(input())

def matrix(a, b):
	return [[0 for i in range(b)] for j in range(a)]

def swap(a, b):
	return (b, a)

def find_gcd(l):
	a = l[0]
	for i in range(len(l)):
		a = gcd(a, l[i])
	return a

def is_prime(n):
	sqrta = int(sqrt(n))
	for i in range(2, sqrta + 1):
		if n % i == 0:
			return 0
	return 1

def prime_factors(n):
	sqrta = int(sqrt(n))
	for i in range(2, sqrta + 1):
		if n % i == 0:
			return [i] + prime_factors(n // i)
	return [n]

def fun(n, k):
	return n // k * (k - 1)

def kth_no(n, k):
	return n // k * (k - 1) + n % k
nc = 'NO'
yc = 'YES'
ns = 'No'
ys = 'Yes'
t = input_int()
for i in range(t):
	(n, W) = get_map()
	w = get_list()
	dict = defaultdict(list)
	for i in range(n):
		dict[w[i]].append(i + 1)
	lower = ceil(W / 2)
	upper = W
	found = 0
	for i in range(n):
		if lower <= w[i] <= upper:
			print(1)
			print(i + 1)
			found = 1
			break
	if found:
		continue
	if sum(w) < lower:
		print(-1)
		continue
	if min(w) > upper:
		print(-1)
		continue
	wt = [i for i in w if i <= upper]
	if sum(wt) < lower:
		print(-1)
		continue
	else:
		res = []
		wt.sort()
		suma = 0
		index = 0
		while not lower <= suma <= upper and index < len(wt):
			suma += wt[index]
			res.append(wt[index])
			index += 1
		print(len(res))
		for i in res:
			print(dict[i].pop(), end=' ')
	print('')


import sys
from collections import defaultdict
from itertools import permutations
from math import sqrt
from functools import reduce

def solve(n, W, w):
	sum = 0
	ret = []
	for i in range(n):
		if (W + 1) // 2 <= sum <= W:
			return ret
		if w[i] > W:
			continue
		if (W + 1) // 2 <= w[i] <= W:
			return [i + 1]
		sum += w[i]
		ret.append(i + 1)
	if sum < (W + 1) // 2:
		return []
	return ret
t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	ans = solve(n, W, w)
	if len(ans) == 0:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


import sys
input = sys.stdin.readline
t = int(input())
for you in range(t):
	l = input().split()
	n = int(l[0])
	w = int(l[1])
	l = input().split()
	li = [(int(l[i]), i) for i in range(n)]
	li.sort()
	done = 0
	for i in range(n):
		if li[i][0] <= w and li[i][0] >= (w + 1) // 2:
			ok = li[i][1]
			done = 1
			break
	if done:
		print(1)
		print(ok + 1)
		continue
	done = 0
	pref = 0
	for i in range(n):
		pref += li[i][0]
		if pref <= w and pref >= (w + 1) // 2:
			done = 1
			ans = i
			break
	if done == 0:
		print(-1)
		continue
	print(ans + 1)
	for i in range(ans + 1):
		print(li[i][1] + 1, end=' ')
	print()


import math
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	l = list(map(int, input().split()))
	x = math.ceil(b / 2)
	m = []
	for i in range(len(l)):
		m.append((l[i], i))
	m.sort(reverse=True)
	p = []
	s = 0
	for i in range(a):
		if s + m[i][0] <= b:
			p.append(m[i][1] + 1)
			s += m[i][0]
	if s >= x:
		print(len(p))
		print(*p)
	else:
		print(-1)


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def solve():
	(n, W) = mints()
	b = list(mints())
	a = [0] * n
	for i in range(len(a)):
		a[i] = (b[i], i + 1)
	a.sort(reverse=True)
	ans = []
	s = 0
	wh = (W + 1) // 2
	for i in range(len(a)):
		if s + a[i][0] <= W:
			s += a[i][0]
			ans.append(a[i][1])
		if s >= wh:
			print(len(ans))
			print(' '.join(map(str, ans)))
			return
	print(-1)
for i in range(mint()):
	solve()


import math
for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	a = []
	s = 0
	for i in range(n):
		if w[i] <= W and w[i] >= math.ceil(W / 2):
			a = [i + 1]
			s = w[i]
			break
		else:
			s += w[i]
			if s > W:
				s -= w[i]
			else:
				a.append(i + 1)
				if s >= math.ceil(W / 2):
					break
	if s >= math.ceil(W / 2):
		print(len(a))
		print(*a)
	else:
		print(-1)


from math import ceil
t = int(input())
for sdfgh in range(t):
	s = input()
	n = int(s.split(' ')[0])
	W = int(s.split(' ')[1])
	s = input()
	w = s.split(' ')
	maxx = -1
	maxi = -1
	for i in range(len(w)):
		w[i] = int(w[i])
		if w[i] > maxx and w[i] <= W:
			maxx = w[i]
			maxi = i
	if maxx >= ceil(W / 2):
		print(1)
		print(maxi + 1)
	elif maxx == -1:
		print(-1)
	else:
		ans = []
		summ = 0
		i = 0
		while i < len(w) and summ < ceil(W / 2):
			if w[i] <= ceil(W / 2):
				ans.append(i + 1)
				summ += w[i]
			i += 1
		if summ >= ceil(W / 2):
			print(len(ans))
			for j in ans:
				print(j, end=' ')
			print()
		else:
			print(-1)


import math
import bisect
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	ls = [int(x) for x in input().split()]
	for i in range(n):
		ls[i] = [ls[i], i + 1]
	ls.sort()
	a = bisect.bisect(ls, [math.ceil(w / 2), 0])
	b = bisect.bisect(ls, [w, 10000000000])
	if a != b:
		print('1\n' + str(ls[a][1]))
	else:
		ans = 0
		l = []
		s = 0
		for i in range(a - 1, -1, -1):
			ans += 1
			l.append(str(ls[i][1]))
			s += ls[i][0]
			if s > w:
				ans -= 1
				l[-1:] = []
				s -= ls[i][0]
			elif math.ceil(w / 2) <= s <= w:
				print(ans)
				l.sort()
				print(' '.join(l))
				break
		else:
			print(-1)


import math
from collections import Counter, defaultdict, deque

def f(n, w, a):
	s = sum(a)
	if s < math.ceil(w / 2):
		return [-1]
	elif s <= w:
		return [n, [i + 1 for i in range(n)]]
	else:
		b = [(a[i], i) for i in range(n)]
		b.sort(key=lambda x: x[0])
		hw = math.ceil(w / 2)
		s = 0
		l = []
		for i in range(n - 1, -1, -1):
			s += b[i][0]
			if s > w:
				s -= b[i][0]
			elif s < hw:
				l.append(b[i][1] + 1)
			else:
				l.append(b[i][1] + 1)
				return [len(l), l]
	return [-1]
t = int(input())
result = []
for i in range(t):
	(n, w) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	result.append(f(n, w, a))
for i in range(t):
	if result[i][0] == -1:
		print(-1)
	else:
		print(result[i][0])
		for j in range(len(result[i][1])):
			print(result[i][1][j], end=' ')
		print()


t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	l = list(map(int, input().split()))
	ans = []
	r_sum = 0
	for (i, j) in enumerate(l):
		if l[i] < (W + 2 - 1) // 2 and r_sum < (W + 2 - 1) // 2:
			ans.append(i + 1)
			r_sum += j
			if r_sum > (W + 2 - 1) // 2:
				break
		elif l[i] >= (W + 2 - 1) // 2 and l[i] <= W:
			ans = []
			ans.append(i + 1)
			r_sum = 0
			r_sum += j
			break
	if len(ans) == 0 or r_sum < (W + 2 - 1) // 2:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


import sys
import math
import bisect
from math import floor, sqrt, log
from collections import defaultdict
scanf = lambda n: [int(i) for i in sys.stdin.readline().split()][:n]
cin = lambda : map(int, sys.stdin.readline().split())
read_int = lambda : int(sys.stdin.readline())
read_string = lambda : sys.stdin.readline()
cout = lambda tt, x: sys.stdout.write('Case #' + str(tt) + ': ' + str(x) + '\n')
MOD = 1000000007

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def mod_inverse(a, n):
	N = n
	xx = 0
	yy = 1
	y = 0
	x = 1
	while n > 0:
		q = a // n
		t = n
		n = a % n
		a = t
		t = xx
		xx = x - q * xx
		x = t
		t = yy
		yy = y - q * yy
		y = t
	x %= N
	x += N
	x %= N
	return x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = False
	prime[1] = False
	return prime

def solve():
	(n, W) = cin()
	t1 = W // 2
	t2 = W % 2
	if t2 != 0:
		t1 += 1
	(arr1, arr2) = ([], [])
	arr = scanf(n)
	f = 0
	for i in range(n):
		if arr[i] >= t1 and arr[i] <= W:
			arr2.append(i + 1)
		if arr[i] <= W:
			f = 1
			arr1.append([arr[i], i])
	(y, z) = (len(arr1), len(arr2))
	if f == 0:
		print(-1)
	elif z != 0:
		print(1)
		print(arr2[0])
	else:
		cnt = 0
		p = -1
		for i in range(y):
			cnt += arr1[i][0]
			if cnt >= t1:
				p = i
				break
		if p == -1:
			print(-1)
		else:
			print(p + 1)
			for i in range(p + 1):
				print(arr1[i][1] + 1, end=' ')
			print()
no_of_testcases = read_int()
for testcase in range(1, no_of_testcases + 1):
	solve()


from math import ceil

def code1():
	x = 0
	for i in boom:
		if i <= w:
			x += i
	return x

def code2():
	print(-1)

def code4(ans):
	print(1)
	print(ans)

def code5():
	print(len(num))
	print(*num)

def code3():
	ans = 0
	for i in range(n):
		if value <= boom[i] <= w:
			return code4(i + 1)
		if ans + boom[i] < w:
			ans += boom[i]
			num.append(i + 1)
		if value <= ans <= w:
			break
	code5()
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	boom = list(map(int, input().split()))
	value = ceil(w / 2)
	summation = code1()
	mi = min(boom)
	if mi > w or summation < value:
		code2()
	else:
		num = []
		code3()


t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	m = 0
	idx = -1
	summ = 0
	ans = []
	for i in range(n):
		if idx == -1 and w[i] <= W:
			idx = i
		elif w[idx] < w[i] <= W:
			idx = i
		if summ < (W + 1) // 2 and summ + w[i] <= W:
			summ = summ + w[i]
			ans.append(str(i + 1))
	if idx == -1:
		print(-1)
	elif w[idx] >= (W + 1) // 2:
		print(1)
		print(idx + 1)
	elif (W + 1) // 2 <= summ:
		print(len(ans))
		print(' '.join(ans))
	else:
		print(-1)


import io, os
from math import *
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	w = sorted(list(zip(w, range(1, n + 1))), reverse=True)
	bag = []
	acc = 0
	for b in w:
		if acc + b[0] > W:
			continue
		acc += b[0]
		bag.append(b[1])
		if acc >= (W + 1) // 2:
			break
	else:
		print(-1)
		continue
	print(len(bag))
	print(*bag)


for u in range(int(input())):
	(n, w) = map(int, input().split())
	x = [int(i) for i in input().split()]
	r = (w + 1) // 2
	z = []
	for i in range(n):
		z.append([x[i], i + 1])
	z = sorted(z)[::-1]
	ans = 0
	l = []
	for i in range(n):
		if ans + z[i][0] > w:
			continue
		else:
			l.append(z[i][1])
			ans += z[i][0]
	if ans < r or ans > w:
		print(-1)
	else:
		print(len(l))
		print(*l)


import sys
import math
from sys import stdin, stdout

def sieve(N):
	primeNumbers = [True] * (N + 1)
	primeNumbers[0] = False
	primeNumbers[1] = False
	i = 2
	while i * i <= N:
		j = i
		if primeNumbers[j]:
			while j * i <= N:
				primeNumbers[j * i] = False
				j += 1
		i += 1
	return primeNumbers

def getPrime(N):
	primes = sieve(N)
	result = []
	for i in range(len(primes)):
		if primes[i]:
			result.append(i)
	return result

def factor(N):
	factors = []
	i = 1
	while i * i <= N:
		if N % i == 0:
			factors.append(i)
			if i != N // i:
				factors.append(N // i)
		i += 1
	return sorted(factors)

def gcd(a, b):
	if a < b:
		return gcd(b, a)
	if b == 0:
		return a
	return gcd(b, a % b)

def extendedGcd(a, b):
	if a < b:
		return extendedGcd(b, a)
	if b == 0:
		return [a, 1, 0]
	res = extendedGcd(b, a % b)
	x = res[2]
	y = res[1] - math.floor(a / b) * res[2]
	res[1] = x
	res[2] = y
	return res

def iterativeModularFunc(a, b, c):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % c
		a = a * a % c
		b = b // 2
	return res

def get_ints_in_variables():
	return map(int, sys.stdin.readline().strip().split())

def get_int():
	return int(input())

def get_ints_in_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_list_of_list(n):
	return [list(map(int, sys.stdin.readline().strip().split())) for _ in range(n)]

def get_string():
	return sys.stdin.readline().strip()

def Solution(arr, n, w):
	res = []
	s = 0
	idx = 0
	flag = 0
	for j in range(n):
		if arr[j] <= w:
			if s + arr[j] > w and 2 * arr[j] < w:
				continue
			else:
				if 2 * arr[j] >= w:
					idx = j + 1
					flag = 1
					break
				res.append(j + 1)
				s += arr[j]
	if flag:
		print(1)
		print(idx)
	elif len(res) > 0 and s <= w and (2 * s >= w):
		print(len(res))
		for v in res:
			print(v, end=' ')
		print()
	else:
		print(-1)

def main():
	for _ in range(get_int()):
		(n, w) = get_ints_in_variables()
		arr = get_ints_in_list()
		Solution(arr, n, w)
main()


from sys import stdin, stdout
import math, bisect
from collections import Counter, deque, defaultdict
L = lambda : list(map(int, stdin.readline().strip().split()))
M = lambda : map(int, stdin.readline().strip().split())
I = lambda : int(stdin.readline().strip())
S = lambda : stdin.readline().strip()
C = lambda : stdin.readline().strip().split()

def pr(a):
	print(' '.join(list(map(str, a))))

def solve():
	(n, w) = M()
	a = L()
	d = {}
	r = (w + 1) // 2
	for i in range(n):
		if a[i] not in d:
			d[a[i]] = []
		d[a[i]].append(i)
	a.sort()
	while a[-1] > w:
		a.pop()
		if not a:
			break
	ans = []
	c = 0
	for i in range(len(a) - 1, -1, -1):
		c += a[i]
		ans += [d[a[i]][-1] + 1]
		d[a[i]].pop()
		if c in range(r, w + 1):
			break
	if not ans or c < r:
		print(-1)
	else:
		print(len(ans))
		pr(ans)
for _ in range(I()):
	solve()


import math
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	f = 0
	s = 0
	t = []
	for i in range(n):
		if l[i] >= math.ceil(w / 2) and l[i] <= w:
			t = [i + 1]
			s = l[i]
			break
		else:
			s += l[i]
			if s > w:
				s -= l[i]
			else:
				t.append(i + 1)
				if s >= math.ceil(w / 2):
					break
	if s >= math.ceil(w / 2):
		print(len(t))
		print(*t)
	else:
		print(-1)


from sys import stdin, stdout
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import *
input = stdin.readline
prin = stdout.write
from random import sample
from collections import Counter, deque
from math import sqrt, ceil, log2, gcd
mod = 10 ** 9 + 7

class DisjSet:

	def __init__(self, n):
		self.rank = [1] * n
		self.parent = [i for i in range(n)]

	def find(self, x):
		if self.parent[x] != x:
			self.parent[x] = self.find(self.parent[x])
		return self.parent[x]

	def union(self, x, y):
		xset = self.find(x)
		yset = self.find(y)
		if xset == yset:
			return
		if self.rank[xset] < self.rank[yset]:
			self.parent[xset] = yset
		elif self.rank[xset] > self.rank[yset]:
			self.parent[yset] = xset
		else:
			self.parent[yset] = xset
			self.rank[xset] = self.rank[xset] + 1

def f(arr, i, j, d, dist):
	if i == j:
		return
	nn = max(arr[i:j])
	for tl in range(i, j):
		if arr[tl] == nn:
			dist[tl] = d
			f(arr, i, tl, d + 1, dist)
			f(arr, tl + 1, j, d + 1, dist)

def ps(n):
	cp = 0
	lk = 0
	arr = {}
	while n % 2 == 0:
		n = n // 2
		lk += 1
	arr[2] = lk
	for ps in range(3, ceil(sqrt(n)) + 1, 2):
		lk = 0
		while n % ps == 0:
			n = n // ps
			arr.append(n)
			arr.append(ps ** (lk + 1))
			lk += 1
		arr[ps] = lk
	if n != 1:
		lk += 1
		arr[n] = lk
	return arr

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def factorials(n, r):
	slr = n
	dpr = r
	qlr = 1
	qs = 1
	mod = 10 ** 9 + 7
	for ip in range(n - r + 1, n + 1):
		qlr = qlr * ip % mod
	for ij in range(1, r + 1):
		qs = qs * ij % mod
	ans = qlr * modInverse(qs) % mod
	return ans

def modInverse(b):
	qr = 10 ** 9 + 7
	return pow(b, qr - 2, qr)
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

def power(arr):
	listrep = arr
	subsets = []
	for i in range(2 ** len(listrep)):
		subset = []
		for k in range(len(listrep)):
			if i & 1 << k:
				subset.append(listrep[k])
		subsets.append(subset)
	return subsets

def dis(xa, ya, xb, yb):
	return sqrt((xa - xb) ** 2 + (ya - yb) ** 2)

def ii():
	return int(input())

def ilist():
	return [int(x) for x in input().strip().split()]

def outstrlist(array: list) -> str:
	array = [str(x) for x in array]
	return ' '.join(array)

def islist():
	return list(map(str, input().split().rstrip()))

def outfast(arr: list) -> str:
	ss = ''
	for ip in arr:
		ss += str(ip) + ' '
	return prin(ss)

def pda(n):
	list = []
	for i in range(1, int(sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				list.append(i)
			else:
				list.append(int(n / i))
				list.append(i)
	return list
t = int(input())
for jj in range(t):
	(n, w) = ilist()
	arr = ilist()
	brr = []
	for i in range(n):
		brr.append([arr[i], i])
	brr = sorted(brr, key=lambda x: x[0])
	cursum = 0
	cc = 0
	ans = []
	kk = ceil(w / 2)
	for i in range(n):
		if brr[i][0] >= kk and brr[i][0] <= w:
			cc = 1
			print(1)
			print(brr[i][1] + 1)
			break
		else:
			cursum += brr[i][0]
			ans.append(str(brr[i][1] + 1))
			if cursum >= kk and cursum <= w:
				cc = 1
				print(len(ans))
				print(' '.join(ans))
				break
	if cc == 0:
		print(-1)


from collections import Counter
from collections import OrderedDict
from collections import defaultdict
import bisect
import math
from sys import setrecursionlimit

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def fre_count(mylist):
	return Counter(mylist)
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = [int(x) for x in input().split()]
	arr3 = [[arr[i], i + 1] for i in range(n)]
	arr3.sort(key=lambda x: x[0], reverse=True)
	knap = []
	totalw = 0
	W = w
	for i in range(n):
		if arr3[i][0] <= w:
			w -= arr3[i][0]
			totalw += arr3[i][0]
			knap.append(arr3[i][1])
		if W / 2 <= totalw <= W:
			break
	if W / 2 <= totalw <= W:
		print(len(knap))
		print(*knap)
	else:
		print(-1)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	l = []
	ans = []
	for i in range(n):
		if a[i] <= w:
			l.append((a[i], i))
	if not l:
		print(-1)
		continue
	l.sort()
	if (w + 1) // 2 <= l[-1][0] <= w:
		print(1)
		print(l[-1][1] + 1)
	else:
		s = 0
		for i in range(len(l)):
			s += l[i][0]
			ans.append(l[i][1] + 1)
			if (w + 1) // 2 <= s <= w:
				break
		if ans and (w + 1) // 2 <= s <= w:
			print(len(ans))
			ans.sort()
			print(*ans)
		else:
			print(-1)


t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	d = {}
	m = min(l)
	x = 0
	if w % 2 == 0:
		x = w // 2
	else:
		x = w // 2 + 1
	if m > w:
		print(-1)
		continue
	elif x in l:
		print(1)
		print(l.index(x) + 1)
		continue
	elif w in l:
		print(1)
		print(l.index(w) + 1)
		continue
	p = -1
	for i in range(n):
		if l[i] > x and l[i] < w:
			p = i + 1
			break
	if p != -1:
		print(1)
		print(p)
		continue
	for i in range(n):
		if l[i] in d.keys():
			d[l[i]].append(i + 1)
		else:
			d[l[i]] = [i + 1]
	s = 0
	ans = []
	f = 1
	for k in sorted(d.keys()):
		if f == 1:
			for i in range(len(d[k])):
				s += k
				if s < x:
					ans.append(d[k][i])
				if s >= x and s <= w:
					ans.append(d[k][i])
					f = 0
					break
	if f == 1:
		print(-1)
		continue
	print(len(ans))
	for i in range(len(ans)):
		print(ans[i], end=' ')
	print()


t = int(input())
for i in range(0, t):
	l = list(map(int, input().split()))
	n = l[0]
	w = l[1]
	minval = w // 2 + w % 2
	maxval = w
	b = []
	csum = 0
	idx = 0
	val = 0
	m = list(map(int, input().split()))
	while idx < n:
		if m[idx] >= minval and m[idx] <= maxval:
			val = 1
			print(1)
			print(idx + 1)
			break
		elif csum + m[idx] <= maxval:
			csum += m[idx]
			b.append(idx + 1)
		idx += 1
	if val == 1:
		pass
	elif len(b) == 0 or csum < minval:
		print(-1)
	elif val == 0:
		print(len(b))
		print(*b)


T = int(input())
for _ in range(T):
	(n, W) = map(int, input().split())
	x = list(map(int, input().split()))
	s = sum(x)
	x = [(x[i], i + 1) for i in range(len(x))]
	x.sort()
	if x[0][0] > W or s < (W + 1) // 2:
		print(-1)
		continue
	cur_sum = 0
	rbound = len(x) - 1
	while rbound >= 0 and x[rbound][0] > W:
		s -= x[rbound][0]
		rbound -= 1
	if s < (W + 1) // 2:
		print(-1)
		continue
	lbound = 0
	while lbound < len(x) and s > W:
		s -= x[lbound][0]
		lbound += 1
	print(rbound - lbound + 1)
	print(' '.join(map(str, [x[k][1] for k in range(lbound, rbound + 1)])))


import sys
input = sys.stdin.readline

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def lcm(a, b):
	return a * b / gcd(a, b)

def main():
	for _ in range(int(input())):
		(n, W) = map(int, input().split())
		w = list(map(int, input().split()))
		ws = []
		d = {}
		for i in range(n):
			ws.append(w[i])
			if w[i] in d:
				d[w[i]].append(i)
			else:
				d[w[i]] = [i]
		ws.sort()
		fand = -1
		if sum(w) < W // 2 + W % 2 or min(w) > W:
			print(-1)
		else:
			for j in range(n - 1, -1, -1):
				if ws[j] >= W // 2 + W % 2 and ws[j] <= W:
					fand = j
					break
			if fand == -1:
				j = 0
				k = 0
				while k < W // 2 + W % 2:
					k += ws[j]
					j += 1
				if k < W // 2 + W % 2 or k > W:
					print(-1)
				else:
					print(j)
					for i in range(j):
						print(d[ws[i]][0] + 1, end=' ')
						d[ws[i]].pop(0)
					print('')
			else:
				print(1)
				print(d[ws[fand]][0] + 1)
	return
main()


ans = []

def main():
	(n, w) = list(map(int, input().split()))
	listt = input().split()
	minvals = []
	sumval = 0
	for i in range(n):
		x = int(listt[i])
		if x > w:
			continue
		if w >= x >= w / 2:
			ans.append('1' + '\n' + str(i + 1))
			return
		sumval += x
		minvals.append(str(i + 1))
		if sumval >= w / 2:
			break
	if sumval >= w / 2:
		ans.append(str(len(minvals)))
		ans.append(' '.join(minvals))
	else:
		ans.append('-1')
	return
for _ in range(int(input())):
	main()
print('\n'.join(ans))


class Item:

	def __init__(self, id, weight):
		self.id = id
		self.weight = weight

def solve(n, w, weights):
	small = []
	res = []
	c = 0
	toTake = None
	for i in range(n):
		if weights[i] > w:
			continue
		if weights[i] >= int((w + 1) / 2):
			toTake = Item(i + 1, weights[i])
		elif c + weights[i] <= w:
			small.append(Item(i + 1, weights[i]))
			c += weights[i]
	if toTake != None:
		print(1)
		return [toTake.id]
	elif c >= int((w + 1) / 2):
		print(len(small))
		for item in small:
			res.append(item.id)
		return res
	else:
		return [-1]
t = int(input())
while t:
	(n, w) = map(int, input().split())
	weights = list(map(int, input().split()))
	print(*solve(n, w, weights))
	t -= 1


def solve():
	(n, W) = map(int, input().split())
	w = [*map(int, input().split())]
	ans = []
	s = 0
	for i in range(n):
		if w[i] >= (W + 1) // 2 and w[i] <= W:
			print(1)
			print(i + 1)
			return
	for i in range(n):
		if w[i] > W:
			continue
		s += w[i]
		ans.append(i + 1)
		if s >= (W + 1) // 2 and s <= W:
			print(len(ans))
			print(*ans)
			return
	print(-1)
for _ in range(int(input())):
	solve()


def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))
import sys
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	(n, W) = [int(x) for x in input().split()]
	w = [int(x) for x in input().split()]
	w2 = []
	for i in range(n):
		w2.append([i + 1, w[i]])
	w2.sort(key=lambda x: x[1])
	l = 0
	total = 0
	possible = False
	for r in range(n):
		total += w2[r][1]
		while total > W:
			total -= w2[l][1]
			l += 1
		if total >= (W + 1) // 2:
			possible = True
			break
	if possible == False:
		print(-1)
	else:
		print(r - l + 1)
		ans = []
		for i in range(l, r + 1):
			ans.append(w2[i][0])
		oneLineArrayPrint(ans)


import sys
import math
input = sys.stdin.readline
t = int(input())
for w in range(t):
	(n, w) = (int(i) for i in input().split())
	l = [int(i) for i in input().split()]
	d = {}
	s = 0
	c = 0
	for i in range(n):
		if l[i] <= w:
			s += l[i]
			d[i + 1] = l[i]
			c += 1
	if s < math.ceil(w / 2):
		print(-1)
	elif s <= w:
		print(c)
		print(*list(d.keys()))
	else:
		d = {d: v for (d, v) in sorted(d.items(), key=lambda item: item[1])}
		l1 = list(d.keys())
		i = 0
		while s > w:
			s -= d[l1[i]]
			i += 1
			c -= 1
		print(c)
		print(*l1[i:])


def main():
	t = int(input())
	for j in range(t):
		(n, w) = map(int, input().split())
		v = [(int(i), index) for (index, i) in enumerate(input().split()) if int(i) <= w]
		if len(v) == 0:
			print(-1)
			continue
		v.sort()
		if v[-1][0] >= (w + 1) // 2:
			print(1)
			print(v[-1][1] + 1)
			continue
		cur_w = 0
		ans = []
		for (i, index) in v:
			cur_w += i
			ans.append(index)
			if cur_w >= (w + 1) // 2:
				print(len(ans))
				print(*(val + 1 for val in ans))
				break
		else:
			print(-1)
main()


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	flag = 0
	cand = []
	for i in range(n):
		if 2 * a[i] >= w and a[i] <= w:
			print(1)
			print(i + 1)
			flag = 1
			break
		if 2 * a[i] < w:
			cand.append(i)
	if flag == 1:
		continue
	tmp = 0
	ans = []
	for i in cand:
		tmp += a[i]
		ans.append(str(i + 1))
		if 2 * tmp >= w and tmp <= w:
			print(len(ans))
			print(' '.join(ans))
			flag = 1
			break
	if flag == 0:
		print(-1)


import sys
import os
from io import BytesIO, IOBase
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')
mod = 10 ** 9 + 7

def lcm(x, y):
	return x * y / gcd(x, y)

def fact(x, mod=mod):
	ans = 1
	for i in range(1, x + 1):
		ans = ans * i % mod
	return ans

def arr2D(n, m, default=0):
	return [[default for j in range(m)] for i in range(n)]

def arr3D(n, m, r, default=0):
	return [[[default for k in range(r)] for j in range(m)] for i in range(n)]

def sortDictV(x):
	return {k: v for (k, v) in sorted(x.items(), key=lambda item: item[1])}

class DSU:

	def __init__(self, length):
		self.length = length
		self.parent = [-1] * self.length

	def getParent(self, node, start):
		if node >= self.length:
			return False
		if self.parent[node] < 0:
			if start != node:
				self.parent[start] = node
			return node
		return self.getParent(self.parent[node], start)

	def union(self, node1, node2):
		parent1 = self.getParent(node1, node1)
		parent2 = self.getParent(node2, node2)
		if parent1 == parent2:
			return False
		elif self.parent[parent1] <= self.parent[parent2]:
			self.parent[parent1] += self.parent[parent2]
			self.parent[parent2] = parent1
		else:
			self.parent[parent2] += self.parent[parent1]
			self.parent[parent1] = parent2
		return True

	def getCount(self, node):
		return -self.parent[self.getParent(node, node)]

def solve(n, w, lst):
	for i in range(n):
		if lst[i] >= (w + 2 - 1) // 2 and lst[i] <= w:
			print(1)
			print(i + 1)
			return
	lst0 = lst.copy()
	lst = sorted(lst)
	summ = 0
	map1 = {}
	for i in range(n):
		map1[i] = lst0[i]
	map1 = sortDictV(map1)
	lst1 = []
	for i in map1:
		summ += map1[i]
		lst1.append(i + 1)
		if summ >= (w + 2 - 1) // 2 and summ <= w:
			print(len(lst1))
			for j in lst1:
				print(j, end=' ')
			print()
			return
	print(-1)
for _ in range(int(input())):
	(n, w) = list(map(int, input().split()))
	lst = list(map(int, input().split()))
	solve(n, w, lst)


t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = [int(j) for j in input().split()]
	if w % 2 == 0:
		goal = w // 2
	else:
		goal = w // 2 + 1
	ans = -1
	for i in range(n):
		if arr[i] >= goal and arr[i] <= w:
			ans = i
			break
	if ans != -1:
		print(1)
		print(ans + 1)
		continue
	tot = 0
	newarr = []
	for i in range(n):
		if tot >= goal:
			break
		if arr[i] <= w:
			newarr += [i]
			tot += arr[i]
	if tot < goal:
		print(-1)
	else:
		print(len(newarr))
		for x in newarr:
			print(x + 1, end=' ')
		print('')


from math import ceil
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	wi = list(map(int, input().split()))
	h = ceil(w / 2)
	if sum(wi) < h or min(wi) > w:
		print(-1)
	else:
		ans = []
		k = 0
		flag = 0
		for i in range(n):
			if h <= wi[i] <= w:
				ans = []
				ans.append(i + 1)
				flag = 1
				break
			elif wi[i] < h:
				k += wi[i]
				ans.append(i + 1)
				if k >= h:
					flag = 1
					break
		if flag == 1:
			print(len(ans))
			print(*ans)
		else:
			print(-1)


import sys
sys.setrecursionlimit(10 ** 5)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()
for _ in range(II()):
	(n, W) = MI()
	ww = LI()
	wi = [(w, i) for (i, w) in enumerate(ww)]
	wi.sort(reverse=True)
	s = 0
	half = (W + 1) // 2
	ans = []
	for (w, i) in wi:
		if s + w > W:
			continue
		s += w
		ans.append(i + 1)
		if s >= half:
			print(len(ans))
			print(*ans)
			break
	else:
		print(-1)


def ii():
	return int(input())

def mii():
	return map(int, input().split())

def lmii():
	return list(mii())
import math

def main():
	for _ in range(ii()):
		(n, k) = mii()
		dup = k
		x = lmii()
		lst = []
		for i in range(n):
			lst.append([x[i], i + 1])
		lst.sort()
		lst.reverse()
		cnt = 0
		ans = []
		for i in range(n):
			if cnt + lst[i][0] <= k:
				ans.append(lst[i][1])
				cnt += lst[i][0]
		if cnt >= (k + 1) // 2 and cnt <= k:
			print(len(ans))
			ans.sort()
			print(*ans)
		else:
			print(-1)
main()


from math import ceil
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	k = ceil(w / 2)
	ans = []
	if min(arr) > w or sum(arr) < k:
		print(-1)
	else:
		summ = 0
		for i in range(n):
			if summ + arr[i] <= w:
				ans.append(i + 1)
				summ += arr[i]
		if summ < k:
			flag = False
			for i in range(n):
				if k <= arr[i] <= w:
					print(1)
					flag = True
					print(i + 1)
					break
			if flag == False:
				print(-1)
		else:
			print(len(ans))
			print(*ans)


import math
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	b = [[a[i], i + 1] for i in range(n)]
	b = sorted(b, key=lambda item: item[0])[::-1]
	x = math.ceil(w / 2)
	ans = []
	y = 0
	for i in range(n):
		if b[i][0] <= w:
			w -= b[i][0]
			y += b[i][0]
			ans.append(b[i][1])
	if y >= x:
		print(len(ans))
		for i in ans:
			print(i, end=' ')
		print()
	else:
		print(-1)


import math
t = int(input())
for y in range(t):
	(n, w) = list(map(int, input().split()))
	d = list(map(int, input().split()))
	minm = (w + 1) // 2
	dic1 = {}
	sum = 0
	lo = []
	boole = True
	for y in range(n):
		if d[y] < minm:
			dic1[y] = d[y]
		elif d[y] <= w:
			print(1)
			print(y + 1)
			boole = False
			break
	if boole == True and len(dic1) == 0:
		print(-1)
	elif boole == True:
		for u in dic1:
			if sum < minm:
				sum += dic1[u]
				lo += [u + 1]
		if sum < minm:
			print(-1)
		else:
			print(len(lo))
			for yu in lo:
				print(yu, end=' ')
			print()


def knapsack(n, w, weights):
	flag2 = 0
	weights = sorted(weights.items(), key=lambda x: x[1], reverse=True)
	if weights[len(weights) - 1][1] > w:
		print(-1)
		return
	listOfItems = list()
	sumOfItems = 0
	for (index, value) in weights:
		if value > w:
			continue
		sumOfItems += value
		listOfItems.append(index)
		if sumOfItems >= w / 2:
			flag2 = 1
			break
	if flag2:
		print(len(listOfItems))
		print(*listOfItems)
	else:
		print(-1)
testcases = int(input())
while testcases:
	testcases -= 1
	(n, w) = tuple(map(int, input().split()))
	weights = {index + 1: int(value) for (index, value) in enumerate(input().split())}
	knapsack(n, w, weights)


import sys
import math

def load_sys():
	return sys.stdin.readlines()

def load_local():
	with open('input.txt', 'r') as f:
		input = f.readlines()
	return input

def knapsack(N, W, arr):
	arr = [(i, n) for (i, n) in enumerate(arr)]
	arr.sort(key=lambda x: -x[1])
	half = math.ceil(W / 2)
	cur_w = 0
	cur_idx = []
	ans = False
	for (i, n) in arr:
		if cur_w + n <= W:
			cur_w += n
			cur_idx.append(i)
		if cur_w >= half:
			ans = True
			break
	if ans:
		print(len(cur_idx))
		print(' '.join([str(x + 1) for x in cur_idx]))
	else:
		print(-1)
input = load_sys()
N = int(input[0])
test_cases = []
for i in range(len(input) // 2 + 1):
	if 2 * i + 2 < len(input):
		(N, W) = input[2 * i + 1].split()
		(N, W) = (int(N), int(W))
		arr = input[2 * i + 2].split()
		arr = [int(x) for x in arr]
		knapsack(N, W, arr)


def main():
	(n, W) = map(int, input().split())
	weights = list(map(int, input().split()))
	for i in range(len(weights)):
		weights[i] = (weights[i], i + 1)
	weights.sort(key=lambda x: x[0])
	while weights and weights[-1][0] > W:
		weights.pop()
	if not weights:
		print('-1')
		return
	if W % 2 == 1:
		half = W // 2 + 1
	else:
		half = W // 2
	pack = []
	ans = 0
	for i in range(len(weights) - 1, -1, -1):
		if half <= ans <= W:
			break
		if ans + weights[i][0] <= W:
			ans += weights[i][0]
			pack.append(weights[i][1])
	if half <= ans <= W:
		pack.sort()
		print(len(pack))
		print(*pack)
	else:
		print('-1')
	return
t = int(input())
for _ in range(t):
	main()


tc = int(input())
for i in range(tc):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	W_half = (W + 1) // 2
	a = False
	z = []
	z_sum = 0
	for (i, w) in enumerate(w):
		if w > W:
			continue
		if w >= W_half:
			print(1)
			print(i + 1)
			a = True
			break
		z_sum += w
		z.append(i + 1)
		if z_sum >= W_half:
			print(len(z))
			print(' '.join(map(str, z)))
			a = True
			break
	if a == False:
		print(-1)


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	t = enumerate(map(int, input().split()))
	(v, sm, ele) = ([], 0, [])
	for (i, j) in t:
		v.append([j, i + 1])
	for i in sorted(v, reverse=True):
		if sm + i[0] <= b:
			sm += i[0]
			ele.append(i[1])
	if sm >= (b + 1) // 2:
		print(len(ele))
		print(*sorted(ele))
	else:
		print(-1)


n = int(input())
for i in range(n):
	(items, totalweight) = map(int, input().split())
	arr = list(map(int, input().split()))
	final = []
	arr = [(num, index) for (index, num) in enumerate(arr)]
	arr.sort(reverse=True)
	total = 0
	for (num, index) in arr:
		if num > totalweight:
			continue
		total += num
		if total > totalweight:
			break
		final.append(str(index + 1))
	if not final or total < totalweight / 2:
		print(-1)
	else:
		print(len(final))
		print(' '.join(final))


def main():
	(n, W) = map(int, input().split())
	weights = list(map(int, input().split()))
	pack = []
	summ = 0
	if W % 2 == 1:
		half = W // 2 + 1
	else:
		half = W // 2
	for i in range(n):
		if half <= weights[i] <= W:
			print(1)
			print(i + 1)
			return
		if weights[i] > W:
			weights[i] = 0
	for i in range(n):
		if summ >= half:
			break
		if weights[i] != 0:
			pack.append(i + 1)
			summ += weights[i]
	if summ >= half:
		print(len(pack))
		pack.sort()
		print(*pack)
	else:
		print('-1')
	return
t = int(input())
for _ in range(t):
	main()


import os
import sys
from io import BytesIO, IOBase
import threading
from bisect import bisect_right
from math import gcd, log
from collections import Counter, defaultdict
from pprint import pprint

def main(case_no):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	arr = []
	s = 0
	for i in range(n):
		if a[i] <= w:
			s += a[i]
			arr.append((a[i], i))
	if s < (w + 1) // 2 or len(arr) == 0:
		print(-1)
		return
	arr.sort(reverse=True)
	asu = 0
	ans = []
	for i in range(len(arr)):
		if asu + arr[i][0] <= w:
			asu += arr[i][0]
			ans.append(arr[i][1] + 1)
		if asu >= (w + 1) // 2:
			break
	print(len(ans))
	su = 0
	for ind in ans:
		su += a[ind - 1]
	assert su <= w
	assert su >= (w + 1) // 2
	print(*ans)
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')
for _ in range(int(input())):
	main(_ + 1)


for _ in range(0, int(input())):
	(n, lim) = map(int, input().split())
	inp = [int(x) for x in input().split()]
	w = [(inp[i], i + 1) for i in range(0, n)]
	w.sort()
	rem = lim
	answer = []
	for i in range(n - 1, -1, -1):
		if rem >= w[i][0]:
			rem -= w[i][0]
			answer.append(w[i][1])
	if 2 * rem > lim:
		print('-1')
	else:
		print(len(answer))
		print(' '.join(map(str, answer)))


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	d = w // 2 + w % 2
	f = False
	for i in range(n):
		if a[i] >= d and a[i] <= w:
			print(1)
			print(i + 1)
			f = True
			break
	if f:
		continue
	s = 0
	ans = []
	for i in range(n):
		if a[i] <= w:
			s += a[i]
			ans.append(i + 1)
		if s >= d:
			f = True
			break
	if f:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))
import sys
input = sys.stdin.buffer.readline
t = int(input())
for _ in range(t):
	(n, W) = [int(x) for x in input().split()]
	w = [int(x) for x in input().split()]
	lthIdx = []
	lthSum = 0
	ok = False
	for i in range(n):
		if w[i] > W:
			continue
		elif w[i] >= (W + 1) // 2:
			print(1)
			print(i + 1)
			ok = True
			break
		else:
			lthIdx.append(i + 1)
			lthSum += w[i]
			if lthSum >= (W + 1) // 2:
				print(len(lthIdx))
				oneLineArrayPrint(lthIdx)
				ok = True
				break
	if ok == False:
		print(-1)


from sys import stdin
c = int(stdin.readline().strip())
for caso in range(c):
	(n, m) = map(int, stdin.readline().strip().split())
	s1 = list(map(int, stdin.readline().strip().split()))
	s = []
	for i in range(n):
		s.append([s1[i], i])
	s.sort()
	md = (m + 1) // 2
	while len(s) > 0 and m < s[-1][0]:
		s.pop()
	if len(s) > 0 and s[-1][0] >= md:
		print(1)
		print(s[-1][1] + 1)
		continue
	s = s[::-1]
	sm = 0
	ans = []
	for i in range(len(s)):
		sm += s[i][0]
		ans.append(s[i][1] + 1)
		if sm >= md:
			break
	ans.sort()
	if sm >= md:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


q = int(input())
for _ in range(q):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	if sum(l) <= (w - 1) // 2:
		print(-1)
	else:
		ll = []
		for i in range(n):
			if l[i] <= w:
				ll.append([l[i], i + 1])
		m = len(ll)
		if m == 0:
			print(-1)
		else:
			ll.sort()
			total = 0
			ost = m - 1
			for i in range(m):
				if total <= (w - 1) // 2:
					total += ll[i][0]
					ost = i
				else:
					break
			if total <= (w - 1) // 2:
				print(-1)
			elif total <= w:
				odp = [ll[i][1] for i in range(ost + 1)]
				print(len(odp))
				print(*odp)
			else:
				print(1)
				print(ll[min(ost + 1, m - 1)][1])


times = int(input())
for _ in range(times):
	(n, W) = [int(x) for x in input().split()]
	weights_raw = [int(x) for x in input().split()]
	weights = [(weights_raw[m], m + 1) for m in range(len(weights_raw))]
	weights = [weight for weight in weights if weight[0] <= W]
	weights.sort()
	ans = []
	r = 0
	sw = 0
	for _ in range(len(weights)):
		(wm, jm) = weights.pop(-1)
		ans.append(jm)
		sw += wm
		if sw >= W / 2 and sw <= W:
			r = 1
			break
	if r:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


def solve():
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	indices = list(range(1, n + 1))
	indices = [x for (_, x) in sorted(zip(a, indices))]
	a.sort()
	s = 0
	c = 0
	out = []
	for i in range(n - 1, -1, -1):
		if s + a[i] <= w:
			c += 1
			out.append(indices[i])
			s += a[i]
		if s >= w / 2:
			break
	if s >= w / 2:
		print(c)
		print(*out)
	else:
		print(-1)
for _ in range(int(input())):
	solve()


import sys
t = int(input())
for test in range(t):
	[n, w] = list(map(int, input().split(' ')))
	a = list(map(int, input().split(' ')))
	sor = sorted(enumerate(a), key=lambda x: x[1])
	s = 0
	i = n - 1
	res = []
	m = 0
	wp = w // 2
	odd = w % 2
	wp = wp + odd
	while i > -1 and s < wp:
		if s + sor[i][1] <= w:
			s = s + sor[i][1]
			res.append(str(sor[i][0] + 1))
			m += 1
		i -= 1
	if s >= wp and s <= w:
		print(m)
		print(' '.join(res))
	else:
		print(-1)


import sys, math
from collections import defaultdict, deque
input = sys.stdin.readline
t = int(input())
while t > 0:
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	ll = []
	f = 0
	mini = math.ceil(w / 2)
	cursum = 0
	for i in range(n):
		cur = l[i]
		if cur >= mini and cur <= w:
			print(1)
			print(i + 1)
			f = 1
			break
		elif cur < mini:
			ll.append(i + 1)
	if f == 0:
		ans = []
		for i in ll:
			cursum += l[i - 1]
			ans.append(i)
			if cursum >= mini:
				break
		if cursum >= mini:
			print(len(ans))
			print(*ans)
		else:
			print(-1)
	t -= 1


import sys
input = sys.stdin.readline
t = int(input())
for tc in range(t):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	w = [(idx, i) for (idx, i) in enumerate(w)]
	ans = []
	w.sort(key=lambda x: -x[1])
	c = 0
	for i in range(n):
		if w[i][1] + c <= W:
			c += w[i][1]
			ans.append(str(w[i][0] + 1))
	if W & 1:
		W += 1
	if ans and c >= W / 2:
		print(len(ans))
		print(' '.join(ans))
	else:
		print(-1)


import sys
import math, bisect
sys.setrecursionlimit(10 ** 5)
from itertools import groupby, accumulate
from heapq import heapify, heappop, heappush
from collections import deque, Counter, defaultdict
I = lambda : int(sys.stdin.readline())
neo = lambda : map(int, sys.stdin.readline().split())
Neo = lambda : list(map(int, sys.stdin.readline().split()))
for _ in range(I()):
	(n, w) = neo()
	A = Neo()
	k = math.ceil(w / 2)
	(Ans, t, f) = ([], 0, 0)
	for i in range(n):
		if k <= A[i] <= w:
			t += A[i]
			Ans = [i + 1]
			break
		else:
			t += A[i]
			if t > w:
				t -= A[i]
			else:
				Ans += [i + 1]
				if k <= t <= w:
					break
	if t >= k:
		print(len(Ans))
		print(*Ans)
	else:
		print(-1)


for u in range(int(input())):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	d = []
	for i in range(n):
		d.append([l[i], i + 1])
	d.sort()
	f = 0
	m = (k + 1) // 2
	for i in range(n):
		if d[i][0] >= m and d[i][0] <= k:
			print(1)
			print(d[i][1])
			f = 1
			break
	if f == 0:
		s = 0
		ka = []
		for i in range(n):
			if d[i][0] < m:
				s += d[i][0]
				ka.append(d[i][1])
				if s >= m and s <= k:
					print(len(ka))
					print(*ka)
					f = 1
					break
	if f == 0:
		print(-1)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__
import math

def gift():
	for _ in range(t):
		(n, W) = list(map(int, input().split()))
		items = list(map(int, input().split()))
		acum = 0
		seq = []
		ans = False
		for (index, ele) in enumerate(items):
			if acum + ele <= W:
				acum += ele
				seq.append(index + 1)
			elif ele >= math.ceil(W / 2) and ele <= W:
				acum = ele
				seq = [index + 1]
			if acum >= math.ceil(W / 2) and acum <= W:
				ans = True
				break
		if ans:
			yield len(seq)
			yield ' '.join([str(x) for x in seq])
		else:
			yield (-1)
t = int(input())
ans = gift()
print(*ans, sep='\n')


import os
import sys
from io import BytesIO, IOBase
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, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	found = False
	b = []
	total = 0
	for i in range(n):
		if a[i] > w:
			continue
		elif (w + 1) // 2 <= a[i] <= w:
			found = True
			print(1)
			print(i + 1)
			break
		else:
			b += [i + 1]
			total += a[i]
			if (w + 1) // 2 <= total <= w:
				print(len(b))
				print(*b)
				found = True
				break
	if not found:
		print(-1)


class Weight:

	def __init__(self, w, i):
		self.weight = w
		self.index = i

	def __lt__(self, other):
		return self.weight < other.weight

def solve():
	(n, total) = (int(x) for x in input().strip().split())
	arr = list(map(lambda x: Weight(x[0], x[1]), zip([int(x) for x in input().strip().split()], range(1, 1 + n))))
	lim = total // 2
	if total & 1:
		lim += 1
	arr_gt_eq_lim = list(filter(lambda t: t.weight >= lim and t.weight <= total, arr))
	arr_lt_lim = list(filter(lambda t: t.weight < lim, arr))
	if len(arr_gt_eq_lim) > 0:
		print(1)
		print(arr_gt_eq_lim[0].index)
		return
	(index, s) = (0, 0)
	while index < len(arr_lt_lim):
		s += arr_lt_lim[index].weight
		if s >= lim:
			break
		index += 1
	if index == len(arr_lt_lim):
		print(-1)
	else:
		print(1 + index)
		print(' '.join(map(str, map(lambda t: t.index, arr_lt_lim[:1 + index]))))
for _ in range(int(input().strip())):
	solve()


import math

def solve():
	(n, W) = map(int, input().split())
	items = list(map(int, input().split()))
	a = [(items[i], i) for i in range(len(items))]
	a.sort(reverse=True)
	C = 0
	ans = []
	for (i, ind) in a:
		if C + i <= W:
			C += i
			ans.append(ind + 1)
		if math.ceil(W / 2) <= C <= W:
			return ans
	return -1
for _ in range(int(input())):
	ans = solve()
	if type(ans) is list:
		print(len(ans))
		print(*ans)
	else:
		print(ans)


import sys, io, os
BUFSIZE = 8192

class FastIO(io.IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = io.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(io.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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
T = int(input())
for _ in range(T):
	(N, W) = map(int, input().split())
	Ws = list(map(int, input().split()))
	Ws = [(i, w) for (i, w) in enumerate(Ws, 1) if w <= W]
	if sum((w for (i, w) in Ws)) >= (W + 1) // 2:
		Ws_big = [(i, w) for (i, w) in Ws if w >= (W + 1) // 2]
		if Ws_big:
			print(1)
			print(Ws_big[0][0])
		else:
			s = 0
			Ans = []
			for (i, w) in Ws:
				s += w
				Ans.append(i)
				if s >= (W + 1) // 2:
					print(len(Ans))
					print(' '.join(map(str, Ans)))
					break
			else:
				assert False
	else:
		print(-1)


tests = int(input())
for _ in range(tests):
	(n, capacity) = map(int, input().split())
	item_weights = list(map(int, input().split()))
	knapsack = []
	total_weight = 0
	for (i, item_weight) in enumerate(item_weights):
		if item_weight <= capacity and 2 * item_weight >= capacity:
			knapsack = [i]
			total_weight = item_weight
			break
		if total_weight + item_weight <= capacity:
			knapsack.append(i)
			total_weight += item_weight
	if 2 * total_weight >= capacity:
		print(len(knapsack))
		print(' '.join([str(i + 1) for i in knapsack]))
	else:
		print(-1)


t = int(input())
R = []
for u in range(t):
	(n, W) = map(int, input().split())
	A = list(map(int, input().split()))
	k = 0
	Q = []
	S = 0
	m = 0
	flag = 0
	for i in range(len(A)):
		if A[i] > W:
			k += 1
		elif A[i] <= W and 2 * A[i] >= W:
			R.append(1)
			R.append(i + 1)
			flag += 1
			break
		else:
			m += 1
			S += A[i]
			Q.append(i + 1)
			if S <= W and 2 * S >= W:
				flag += 1
				R.append(m)
				R.append(Q)
				break
	if flag == 0:
		R.append(-1)
for h in range(len(R)):
	if type(R[h]) == list:
		for k in range(len(R[h])):
			print(R[h][k], end=' ')
	else:
		print(R[h])


from sys import stdin, stdout
stdin.readline

def mp():
	return list(map(int, stdin.readline().strip().split()))

def it():
	return int(stdin.readline().strip())
from collections import defaultdict as dd, Counter as C, deque
from math import ceil, gcd, sqrt, factorial
from itertools import permutations
for _ in range(it()):
	(n, w) = mp()
	k = mp()
	pre = []
	flag = 0
	for i in range(n):
		pre.append([i + 1, k[i]])
	pre.sort(key=lambda x: x[1], reverse=True)
	x = ceil(w / 2)
	for i in range(n):
		if pre[i][1] <= w and pre[i][1] >= x:
			print(1)
			print(pre[i][0])
			flag = 1
			break
	if flag:
		continue
	if sum(k) < x:
		print(-1)
		continue
	elif pre[-1][1] > x:
		print(-1)
		continue
	ans = 0
	p = 0
	v = []
	for i in range(n):
		if pre[i][1] >= x:
			continue
		elif ans < x:
			ans += pre[i][1]
			p += 1
			v.append(pre[i][0])
		else:
			break
	if ans > w:
		print(-1)
	elif ans < x:
		print(-1)
	else:
		print(p)
		print(*v)


from sys import stdin, stdout
import math
import heapq
import collections
input = stdin.readline

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputstrings():
	return [x for x in input().split()]

def inputstringnum():
	return [ord(x) - ord('a') for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	(n, w) = inputnums()
	a = inputlist()
	ans = -1
	for i in range(n):
		if a[i] <= w and a[i] * 2 >= w:
			ans = i + 1
	if ans != -1:
		print(1)
		print(ans)
		continue
	v = []
	sm = 0
	for i in range(n):
		if a[i] + sm <= w:
			sm += a[i]
			v.append(i + 1)
	if sm * 2 >= w:
		print(len(v))
		print(*v)
	else:
		print(-1)


import os
import sys
from io import BytesIO, IOBase
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()

def RL():
	return map(int, sys.stdin.readline().split())

def RLL():
	return list(map(int, sys.stdin.readline().split()))

def N():
	return int(input())

def print_list(l):
	print(' '.join(map(str, l)))
import bisect as bs
for _ in range(N()):
	(n, w) = RL()
	a = RLL()
	a = sorted([(a[i], i) for i in range(n)])
	res = []
	key = w + 1 >> 1
	e = n
	s = 0
	while 1:
		t = bs.bisect(a, (key, -1), 0, e)
		if t < e and s + a[t][0] <= w:
			res.append(a[t][1] + 1)
			s += a[t][0]
			break
		elif t > 0:
			key -= a[t - 1][0]
			e = t - 1
			res.append(a[t - 1][1] + 1)
			s += a[t - 1][0]
		else:
			break
	if w + 1 >> 1 <= s <= w:
		print(len(res))
		print_list(res)
	else:
		print(-1)


from math import *
import threading
import sys
mod = 10 ** 9 + 7

def npr(n, r):
	return factorial(n) // factorial(n - r) if n >= r else 0

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = -1
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = mid
			break
	return ans

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far

def pref(li):
	pref_sum = [0]
	for i in li:
		pref_sum.append(pref_sum[-1] + i)
	return pref_sum

def graph(n, m):
	adj = dict()
	for i in range(1, n + 1):
		adj.setdefault(i, 0)
	for i in range(m):
		(a, b) = map(int, input().split())
		adj[a] += 1
		adj[b] += 1
	return adj

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	li = []
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, len(prime)):
		if prime[p]:
			li.append(p)
	return li

def primefactors(n):
	factors = []
	while n % 2 == 0:
		factors.append(2)
		n //= 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			factors.append(i)
			n //= i
	if n > 2:
		factors.append(n)
	return factors

def prod(li):
	ans = 1
	for i in li:
		ans *= i
	return ans
sys.setrecursionlimit(300000)
for _ in range(int(input()) if True else 1):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	b = []
	for i in range(n):
		b.append((a[i], i + 1))
	b.sort()
	weight = 0
	ans = []
	f = 0
	for i in range(n):
		weight += b[i][0]
		ans.append(b[i][1])
		if weight > w:
			if b[i][0] >= (w + 1) // 2 and b[i][0] <= w:
				ans = [b[i][1]]
				f = 1
			break
		elif weight >= (w + 1) // 2:
			f = 1
			break
	ans.sort()
	if f:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


from math import ceil
t = int(input())
answers = []
for _ in range(t):
	(n, W) = map(int, input().split())
	minW = ceil(W / 2.0)
	w = [(val, ind + 1) for (ind, val) in enumerate(list(map(int, input().split()))) if val <= W]
	w.sort(key=lambda x: x[0], reverse=True)
	summ = 0
	for wi in w:
		summ += wi[0]
	if summ < minW:
		answers.append([-1])
	else:
		summ = 0
		answer = []
		for wi in w:
			if summ + wi[0] <= W:
				answer.append(wi[1])
				summ += wi[0]
			if summ >= minW:
				answers.append(answer)
				break
for answer in answers:
	if answer[0] == -1:
		print(-1)
	else:
		print(len(answer))
		print(' '.join(map(str, answer)))


from itertools import accumulate
from bisect import *
for _ in ' ' * int(input()):
	(n, m) = map(int, input().split())
	a = sorted([(int(x), i) for (i, x) in enumerate(input().split())])
	b = [x for (x, y) in a]
	x = bisect_left(b, m / 2)
	if x < len(b) and m / 2 <= b[x] <= m:
		print(1)
		print(a[x][1] + 1)
		continue
	ans = []
	(s, n) = (0, m / 2)
	for i in range(x):
		s += a[i][0]
		ans.append(a[i][1] + 1)
		if s >= n:
			break
	else:
		print(-1)
		continue
	print(len(ans))
	print(*ans)


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	x = list(map(int, input().split()))
	y = list(enumerate(x))
	y = sorted(y, key=lambda i: i[1], reverse=True)
	l = []
	sm = 0
	for i in range(len(x)):
		if y[i][1] > w:
			continue
		else:
			sm += y[i][1]
			l.append(y[i][0] + 1)
		if sm >= w / 2:
			break
	if len(l) == 0 or sm < w / 2:
		print(-1)
	else:
		print(len(l))
		print(*l)


from math import ceil

def func():
	for i in range(n):
		if ceil(W / 2) <= w[i] <= W:
			print(1)
			print(i + 1)
			return
		elif w[i] > W:
			w[i] = -1
	lst = list()
	total = 0
	for i in range(n):
		if w[i] == -1:
			continue
		lst.append(i + 1)
		total += w[i]
		if total >= ceil(W / 2):
			print(len(lst))
			print(*lst)
			return
	print(-1)
for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	func()


testCase = int(input())
for i in range(testCase):
	(n, w) = map(int, input().split())
	weights = list(map(int, input().split()))
	total = 0
	items = 0
	ans = []
	for c in range(len(weights)):
		if weights[c] >= w / 2 and weights[c] <= w:
			ans = [c + 1]
			total = weights[c]
			items = 1
			break
		elif weights[c] + total <= w:
			total += weights[c]
			items += 1
			ans.append(c + 1)
		if total >= w / 2:
			break
	if total < w / 2:
		print(-1)
	else:
		print(items)
		for c in range(items):
			if c == items - 1:
				print(ans[c])
			else:
				print(ans[c], end=' ')


from math import ceil
for i1 in range(int(input())):
	(n, W) = [int(i) for i in input().split()]
	a = [int(i) for i in input().split()]
	a = [(a[i], i) for i in range(n)]
	a.sort(reverse=True)
	H = ceil(W / 2)
	now = 0
	r = n
	ans = []
	for (i, ind) in a:
		if now + i > W:
			continue
		now += i
		r -= 1
		ans.append(ind + 1)
	if now < H or now > W:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


R = lambda : map(int, input().split())
(t,) = R()
for _ in [0] * t:
	(n, w) = R()
	(a, b) = zip(*sorted(zip((w + 1, *R()), range(n + 1))))
	i = s = 0
	while 2 * a[i] < w > 2 * s:
		s += a[i]
		i += 1
	if 2 * s < w < a[i]:
		print(-1)
	else:
		r = (b[:i], [b[i]])[2 * s < w]
		print(len(r), *r)


t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	W = list(map(int, input().split()))
	if sum(W) < (w + 1) // 2:
		print(-1)
	elif min(W) > w:
		print(-1)
	elif sum(W) <= w:
		ans = list(range(1, n + 1))
		print(len(ans))
		print(*ans)
	else:
		A = [(a, i) for (i, a) in enumerate(W)]
		A.sort(reverse=True)
		s = 0
		ans = []
		for (a, i) in A:
			if a > w:
				continue
			elif (w + 1) // 2 <= a <= w:
				s = a
				ans = [i + 1]
				break
			elif s + a <= w:
				s += a
				ans.append(i + 1)
		if ans and s >= (w + 1) // 2:
			ans.sort()
			print(len(ans))
			print(*ans)
		else:
			print(-1)


import math as mt
t = int(input())
for i in range(0, t):
	(m, n) = map(int, input().split())
	arr = list(map(int, input().strip().split()))[:m]
	arr1 = []
	x = mt.ceil(n / 2)
	summ = 0
	arr2 = []
	ct = 0
	for j in range(0, m):
		if arr[j] <= n:
			if summ + arr[j] > n or arr[j] >= x:
				ct += 1
				arr2.append(j + 1)
				break
			else:
				summ = summ + arr[j]
				arr1.append(j + 1)
				if summ >= x:
					break
	if summ < x and ct == 0:
		print(-1)
	elif ct == 1:
		print(1)
		print(*arr2, sep=' ')
	elif ct == 0:
		xx = len(arr1)
		print(xx)
		print(*arr1, sep=' ')


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import ceil, floor
from copy import *
from collections import deque, defaultdict
from collections import Counter as counter
from itertools import combinations
from itertools import permutations as permutate
from bisect import bisect_left as bl
from operator import *
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192
from sys import stderr

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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def pow(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def gcd(a, b):
	if a == b:
		return a
	while b > 0:
		(a, b) = (b, a % b)
	return a

def prefix_sum(ar):
	return list(accumulate(ar))

def suffix_sum(ar):
	return list(accumulate(ar[::-1]))[::-1]

def N():
	return int(inp())
dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]

def YES():
	print('YES')

def NO():
	print('NO')

def Yes():
	print('Yes')

def No():
	print('No')
from collections import defaultdict

def numberOfSetBits(i):
	i = i - (i >> 1 & 1431655765)
	i = (i & 858993459) + (i >> 2 & 858993459)
	return ((i + (i >> 4) & 252645135) * 16843009 & 4294967295) >> 24

class MergeFind:

	def __init__(self, n):
		self.parent = list(range(n))
		self.size = [1] * n
		self.num_sets = n

	def find(self, a):
		to_update = []
		while a != self.parent[a]:
			to_update.append(a)
			a = self.parent[a]
		for b in to_update:
			self.parent[b] = a
		return self.parent[a]

	def merge(self, a, b):
		a = self.find(a)
		b = self.find(b)
		if a == b:
			return
		self.num_sets -= 1
		self.parent[a] = b
		self.size[b] += self.size[a]

	def set_size(self, a):
		return self.size[self.find(a)]

	def __len__(self):
		return self.num_sets

def lcm(a, b):
	return abs(a // gcd(a, b) * b)

def solve():
	(n, w) = sep()
	l = (w + 1) // 2
	tr = 0
	brr = []
	crr = []
	su = 0
	t_ar = lis()
	for i in range(n):
		k = t_ar[i]
		if tr:
			continue
		if k >= l and k <= w:
			tr = 1
			print(1)
			print(i + 1)
			return
		if k < l:
			brr.append(k)
			crr.append(i + 1)
			su += k
	if tr:
		return
	if su < l:
		print(-1)
		return
	n = len(brr)
	arr = []
	ts = 0
	for i in range(n):
		ts += brr[i]
		arr.append(crr[i])
		if ts >= l:
			break
	arr.sort()
	print(len(arr))
	print(*arr)
testcase(int(inp()))


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	p = [(el, i) for (i, el) in enumerate(arr) if el <= w]
	p.sort(reverse=True)
	temp = 0
	goal = (w + 1) // 2
	res = []
	for (el, j) in p:
		temp += el
		res.append(j + 1)
		if temp >= goal:
			break
	if temp >= goal:
		res.sort()
		print(len(res))
		print(*res)
	else:
		print(-1)


import math
from collections import defaultdict as dft, Counter, deque
from heapq import heappush, heappop

def mp():
	return map(int, input().split())

def ml():
	return list(map(int, input().split()))

def solve():
	(n, w) = mp()
	arr = ml()
	ls = []
	temp = math.ceil(w / 2)
	left = []
	right = []
	for i in range(n):
		if arr[i] <= temp:
			left.append([arr[i], i])
		else:
			right.append([arr[i], i])
	left.sort()
	right.sort()
	if right and temp <= right[0][0] <= w:
		print(1)
		print(right[0][1] + 1)
	else:
		res = []
		sm = 0
		for (num, i) in left:
			if sm + num > w:
				break
			else:
				sm += num
				res.append(i + 1)
		if temp <= sm <= w:
			print(len(res))
			print(*res)
		else:
			print(-1)
tc = int(input())
for _ in range(tc):
	solve()


import sys
import math
cin = int(sys.stdin.readline().strip())
for testcase in range(cin):
	cin1 = list(map(int, sys.stdin.readline().strip().split()))
	cin2 = list(map(int, sys.stdin.readline().strip().split()))
	for i in range(len(cin2)):
		cin2[i] = (cin2[i], i)
	cap = cin1[1]
	cin2.sort()
	c = 0
	i = 0
	l = []
	while i < len(cin2):
		if c + cin2[i][0] <= cap:
			l.append(cin2[i][1] + 1)
			c += cin2[i][0]
			i += 1
		else:
			break
	if c < math.ceil(cap / 2) or c == 0:
		f = False
		for i in cin2:
			if i[0] >= math.ceil(cap / 2) and i[0] <= cap:
				print('1')
				print(i[1] + 1)
				f = True
				break
		if not f:
			print('-1')
	elif l == []:
		print('-1')
	else:
		s = ''
		for i in range(len(l)):
			l[i] = str(l[i])
		print(len(l))
		print(' '.join(l))


from math import ceil
t = int(input())
answers = []
for _ in range(t):
	nw = input().split()
	w = input().split()
	w_int = []
	kisebb = []
	minimum = ceil(int(nw[1]) / 2.0)
	answer = []
	for i in range(int(nw[0])):
		w_int.append(int(w[i]))
	stop = False
	for j in range(int(nw[0])):
		if w_int[j] < minimum:
			kisebb.append(w_int[j])
		elif w_int[j] >= minimum and w_int[j] <= int(nw[1]):
			answer.append(1)
			answer.append([str(j + 1)])
			stop = True
			break
	if stop:
		answers.append(answer)
		continue
	if sum(kisebb) < minimum:
		answers.append(-1)
		continue
	osszeg = 0
	items = []
	for k in range(int(nw[0])):
		if w_int[k] < minimum:
			osszeg += w_int[k]
			items.append(str(k + 1))
		if osszeg >= minimum:
			break
	answer.append(len(items))
	answer.append(items)
	answers.append(answer)
for l in range(t):
	if answers[l] == -1:
		print(answers[l])
	else:
		print(answers[l][0])
		print(' '.join(answers[l][1]))


t = int(input())

def findMaxSubarraySum(arr, n, sum):
	curr_sum = arr[0][0]
	max_sum = 0
	start = 0
	for i in range(1, n):
		if curr_sum <= sum:
			max_sum = max(max_sum, curr_sum)
		while curr_sum + arr[i][0] > sum and start < i:
			curr_sum -= arr[start][0]
			start += 1
		curr_sum += arr[i][0]
	if curr_sum <= sum:
		max_sum = max(max_sum, curr_sum)
	return max_sum

def subArraySum(arr, n, sum):
	curr_sum = arr[0][0]
	start = 0
	i = 1
	while i <= n:
		while curr_sum > sum and start < i - 1:
			curr_sum = curr_sum - arr[start][0]
			start += 1
		if curr_sum == sum:
			print(i - start)
			for i in range(start, i):
				print(arr[i][1], end=' ')
			print()
			break
		if i < n:
			curr_sum = curr_sum + arr[i][0]
		i += 1
for _ in range(t):
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	for i in range(n):
		a[i] = [a[i], i + 1]
	a.sort()
	ramu = findMaxSubarraySum(a, n, m)
	if ramu >= m / 2:
		subArraySum(a, n, ramu)
	else:
		print(-1)


import sys
from bisect import bisect_left

def fun():
	i = bisect_left(Y, (W + 1) // 2)
	if i != n and (W + 1) // 2 <= Y[i] <= W:
		print(1)
		print(X.index(Y[i]) + 1)
		return True
for _ in range(int(input())):
	(n, W) = [int(_) for _ in input().split()]
	X = [int(_) for _ in input().split()]
	Y = sorted(X)
	if sum(X) < (W + 1) // 2 or W < min(X):
		print(-1)
		continue
	i = bisect_left(Y, (W + 1) // 2)
	if i != n and (W + 1) // 2 <= Y[i] <= W:
		print(1)
		print(X.index(Y[i]) + 1)
		continue
	x = 0
	ANS = []
	for _ in range(n):
		if X[_] <= W // 2:
			ANS.append(_ + 1)
			x += X[_]
			if (W + 1) // 2 <= x <= W:
				print(len(ANS))
				print(*ANS)
				break
	else:
		print(-1)


import math
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	wt = list(map(int, input().split()))
	flag = []
	for i in range(n):
		flag.append([wt[i], i + 1])
	res = sorted(flag)[::-1]
	cnt = 0
	new = []
	item = 0
	i = 0
	if w == 1:
		if res[-1][0] == 1:
			print(1)
			print(res[-1][1])
		else:
			print(-1)
	else:
		while cnt < math.ceil(w / 2) and i < len(res):
			if res[i][0] <= w and res[i][0] >= math.ceil(w / 2):
				cnt += res[i][0]
				item += 1
				new.append(res[i][1])
				break
			elif res[i][0] <= math.ceil(w / 2):
				cnt += res[i][0]
				item += 1
				new.append(res[i][1])
			i += 1
		new2 = sorted(new)
		if cnt >= math.ceil(w / 2) and cnt <= w:
			print(item)
			print(*new2)
		else:
			print(-1)


for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = [int(i) for i in input().split()]
	a = [[w[i], i + 1] for i in range(n)]
	a.sort(key=lambda x: x[0], reverse=True)
	q = 0
	ans = []
	for i in range(n):
		if a[i][0] + q <= W:
			q += a[i][0]
			ans.append(a[i][1])
	if q < (W + 1) // 2:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


def first(a):
	return a[0]
for i in range(int(input())):
	(n, w) = map(int, input().split())
	ls = list(map(int, input().split()))
	lstup = [(ls[i], i + 1) for i in range(n)]
	lstup.sort(key=first, reverse=1)
	kq = []
	tong = 0
	for item in lstup:
		if item[0] > w:
			continue
		tong += item[0]
		kq.append(item[1])
		if tong >= (w + 1) // 2:
			break
	if len(kq) == 0 or tong < (w + 1) // 2:
		print(-1)
	else:
		print(len(kq))
		print(*kq)


from math import ceil
import bisect
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	wi = list(map(int, input().split()))
	half = ceil(w / 2)
	li = [(j, i) for (i, j) in enumerate(wi)]
	li.sort()
	lival = [i[0] for i in li]
	right = bisect.bisect_right(lival, w)
	left = bisect.bisect_left(lival, w)
	if right - left > 0:
		print(1)
		print(li[left][1] + 1)
	else:
		summ = 0
		ind = []
		for i in range(left - 1, -1, -1):
			summ += lival[i]
			if half <= summ <= w:
				for ii in range(left - 1, i - 1, -1):
					ind.append(li[ii][1] + 1)
				print(len(ind))
				print(*ind)
				break
		else:
			print(-1)


from collections import defaultdict as dd, deque as dq, Counter as c
from math import factorial as f, ceil, gcd, sqrt
from itertools import permutations as p

def it():
	return int(input())

def mp():
	return map(int, input().split())
for j in range(it()):
	(a, b) = mp()
	c = list(mp())
	re = ceil(b / 2)
	if sum(c) < ceil(b / 2) or min(c) > b:
		print(-1)
	else:
		ll = []
		t = list(enumerate(c))
		t.sort(key=lambda i: i[1])
		t.reverse()
		ans = 0
		num = 0
		for (l, m) in t:
			if m + ans <= b:
				num += 1
				ans += m
				ll.append(l + 1)
		if ans >= re:
			print(num)
			print(*sorted(ll))
		else:
			print(-1)


def run():
	t = int(input())
	for _ in range(t):
		(n, W) = tuple(map(int, input().split()))
		weights0 = list(map(int, input().split()))
		weights = []
		for (idx, w) in enumerate(weights0):
			weights.append([w, idx + 1])
		weights.sort()
		target_weight = W // 2 + 1 if W % 2 != 0 else W // 2
		knap = []
		sum_knap = 0
		while target_weight > sum_knap or sum_knap > W:
			if weights:
				(w, idx) = weights.pop()
				if sum_knap + w > W:
					continue
				sum_knap += w
				knap.append(idx)
			else:
				break
		if not knap:
			print(-1)
		elif sum_knap >= target_weight:
			print(len(knap))
			print(' '.join(map(str, knap)))
		else:
			print(-1)
run()


from sys import stdin, stdout
import math
from collections import deque
input = stdin.readline

def print(*args, end='\n'):
	s = []
	for i in args:
		s.append(str(i) + ' ')
	s = ''.join(s)
	stdout.write(s + end)

def solve():
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	m = [[l[i], i + 1] for i in range(n)]
	l = m.copy()
	l.sort(key=lambda x: x[0], reverse=True)
	cur = 0
	b = [False] * n
	flag = 0
	for i in range(n):
		if cur + l[i][0] <= w:
			cur += l[i][0]
			b[i] = True
		if cur >= math.ceil(w / 2) and cur <= w:
			flag = 1
			break
	cc = b.count(True)
	if flag:
		print(cc)
		for i in range(n):
			if b[i]:
				print(l[i][1], end=' ')
		print()
		return
	print(-1)
tt = 1
tt = int(input())
for __ in range(tt):
	solve()


for _ in range(int(input())):
	(n, w) = tuple(map(int, input().split()))
	arr = sorted(list(enumerate(map(int, input().split()))), key=lambda x: x[1])
	need = (w - 1) // 2 + 1
	while len(arr) > 0 and arr[-1][1] > w:
		arr.pop()
	if len(arr) == 0:
		print(-1)
		continue
	ans = []
	get = 0
	while get < need and len(arr) > 0:
		(index, now) = arr.pop()
		get += now
		ans.append(index)
	if get < need:
		print(-1)
	else:
		print(len(ans))
		print(*[i + 1 for i in sorted(ans)])


import os
import sys
from io import BytesIO, IOBase
import math as M
import itertools as ITR
from collections import defaultdict as D
from collections import Counter as C
from collections import deque as Q
import threading
from functools import lru_cache, reduce
from functools import cmp_to_key as CMP
from bisect import bisect_left as BL
from bisect import bisect_right as BR
import random as R
import string
import cmath, time
enum = enumerate
start_time = time.time()
MOD = 1000000007
MA = float('inf')
MI = float('-inf')

def increase_stack():
	sys.setrecursionlimit(2 ** 32 // 2 - 1)
	threading.stack_size(1 << 27)
	t = threading.Thread(target=main)
	t.start()
	t.join()

def prints(a):
	print(a, end=' ')

def binary(n):
	return bin(n)[2:]

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def maxfactor(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
	if q:
		return q[-1]

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(M.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	l.sort()
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def seive(n):
	a = [1]
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p ** 2, n + 1, p):
				prime[i] = False
		p = p + 1
	for p in range(2, n + 1):
		if prime[p]:
			a.append(p)
	return a

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(M.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countchar(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def str_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q

def lis(arr):
	n = len(arr)
	lis = [1] * n
	maximum = 0
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] > arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
				maximum = max(maximum, lis[i])
	return maximum

def lcm(arr):
	a = arr[0]
	val = arr[0]
	for i in range(1, len(arr)):
		gcd = gcd(a, arr[i])
		a = arr[i]
		val *= arr[i]
	return val // gcd

def ncr(n, r):
	return M.factorial(n) // (M.factorial(n - r) * M.factorial(r))

def npr(n, r):
	return M.factorial(n) // M.factorial(n - r)

def inint():
	return int(inp())

def inarr():
	return list(map(int, inp().split()))

def invar():
	return map(int, inp().split())

def instr():
	s = inp()
	return list(s)

def insarr():
	return inp().split()
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))
inp = lambda : sys.stdin.readline().rstrip('\r\n')
TestCases = 1

def solve():
	(n, c) = invar()
	arr = inarr()
	tot = sum(arr)
	q = c / 2
	res = []
	p = 0
	j = 0
	while j < n:
		ele = arr[j]
		if ele > c:
			j += 1
			continue
		if q <= ele <= c:
			p = ele
			res = [j + 1]
			break
		if p + ele <= c:
			p += ele
			res.append(j + 1)
		j += 1
	if p < q:
		print(-1)
		return
	print(len(res))
	print(*res)

def main():
	flag = 0
	try:
		sys.stdin = open('c:/Users/Manoj Chowdary/Documents/python/CodeForces/contest-div-2/input.txt', 'r')
		sys.stdout = open('c:/Users/Manoj Chowdary/Documents/python/CodeForces/contest-div-2/output.txt', 'w')
	except:
		flag = 1
	t = 1
	if TestCases:
		t = inint()
	for _ in range(1, t + 1):
		solve()
	if not flag:
		print('Time: %.4f sec' % (time.time() - start_time))
		localtime = time.asctime(time.localtime(time.time()))
		print(localtime)
		sys.stdout.close()
main()


from sys import exit, stderr

def debug(*args):
	for i in args:
		stderr.write(str(i) + ' ')
	stderr.write('\n')

class Input:

	def __init__(self):
		self.i = 0
		self.sum = 0

	def input(self, x):
		self.i += 1
		self.sum += int(x)
		return [int(x), self.i]

def half(k):
	if k % 2 == 1:
		return (k + 1) // 2
	return k // 2

def binary_search(l, val):
	ln = len(l)
	s = 0
	e = ln - 1
	while s + 1 != e:
		mid = (s + e) // 2
		if l[mid][0] <= val:
			s = mid
		else:
			e = mid
	return e
for _ in range(int(input())):
	obj = Input()
	(n, W) = map(int, input().split())
	w = [obj.input(x) for x in input().split()]
	w = sorted(w, key=lambda x: x[0])
	targ = half(W)
	ind = binary_search([0] + w + [w[-1][0] + 1], targ)
	if ind <= n:
		if w[ind - 1][0] <= W:
			print(1)
			print(w[ind - 1][1])
			continue
	if obj.sum < targ:
		print(-1)
		continue
	(sm, fg) = (0, True)
	for i in range(min(ind, n)):
		sm += w[i][0]
		if sm > W:
			break
		if sm >= targ and sm <= W:
			ans = [w[x][1] for x in range(i, -1, -1)]
			print(len(ans))
			print(*sorted(ans))
			fg = False
			break
	if fg:
		print(-1)


for t in range(int(input())):
	l2 = input().split()
	l2 = [int(i) for i in l2]
	n = l2[0]
	w = l2[1]
	l3 = input().split()
	ws = [int(i) for i in l3]
	bleh = []
	cleh = []
	flag = 0
	sum1 = 0
	for i in range(n):
		if ws[i] > w:
			continue
		elif ws[i] >= w / 2:
			cleh.append(i + 1)
			flag = 1
			break
		elif ws[i] < w / 2:
			sum1 += ws[i]
			bleh.append(i + 1)
			if w >= sum1 >= w / 2:
				flag = 1
				break
	if flag == 0:
		print(-1)
	elif cleh:
		print(len(cleh))
		print(cleh[0])
	else:
		print(len(bleh))
		for i in range(len(bleh)):
			print(bleh[i])


from io import IOBase
from bisect import *
from sys import stdin
(t, *file) = IOBase.readlines(stdin)
for i in range(int(t)):
	(n, m) = map(int, file[i * 2].split())
	a = sorted([(int(x), i) for (i, x) in enumerate(file[i * 2 + 1].split())])
	b = [x for (x, y) in a]
	x = bisect_left(b, m / 2)
	if x < len(b) and m / 2 <= b[x] <= m:
		print(1, a[x][1] + 1)
		continue
	(ans, s, n) = ([], 0, m / 2)
	for i in range(x):
		s += a[i][0]
		ans.append(a[i][1] + 1)
		if s >= n:
			break
	else:
		print(-1)
		continue
	print(len(ans), *ans)


from sys import stdin, stdout
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = [int(x) for x in input().split()]
	p = []
	for i in range(n):
		p.append((arr[i], i))
	p = sorted(p, key=lambda x: x[0], reverse=True)
	start = 0
	end = 0
	x = 0
	for i in range(n):
		x += p[i][0]
		if x >= w // 2 + w % 2 and x <= w:
			end = i
			break
		elif x > w:
			while x > w:
				x -= p[start][0]
				start += 1
	else:
		print(-1)
		continue
	vals = []
	for i in range(start, end + 1):
		vals.append(p[i][1] + 1)
	print(len(vals))
	print(*sorted(vals))


import math
t = int(input())
for zz in range(t):
	(n, capacity) = map(int, input().split())
	weights = list(map(int, input().split()))
	sol = []
	w = 0
	found = 0
	for i in range(n):
		if weights[i] <= capacity:
			if weights[i] >= math.ceil(capacity / 2):
				print(1)
				print(i + 1)
				found = 1
				break
			else:
				w += weights[i]
				sol.append(i + 1)
				if w >= math.ceil(capacity / 2):
					print(len(sol))
					print(' '.join(map(str, sol)))
					found = 1
					break
	if found == 0:
		print(-1)


import sys
input = sys.stdin.readline
for f in range(int(input())):
	(n, w) = map(int, input().split())
	ws = list(map(int, input().split()))
	curval = 0
	curind = []
	half = (w + 1) // 2
	for i in range(n):
		if curval + ws[i] <= w:
			curval += ws[i]
			curind.append(i + 1)
		elif ws[i] >= half and ws[i] <= w:
			curval = ws[i]
			curind = [i + 1]
		if curval >= half:
			break
	if curval >= half:
		print(len(curind))
		print(*curind)
	else:
		print(-1)


tests = int(input())
for _ in range(tests):
	(n, capacity) = map(int, input().split())
	item_weights = list(map(int, input().split()))
	sorted_indices = sorted(range(n), key=lambda i: item_weights[i], reverse=True)
	knapsack = []
	total_weight = 0
	for i in sorted_indices:
		if total_weight + item_weights[i] <= capacity:
			knapsack.append(i)
			total_weight += item_weights[i]
	if capacity <= 2 * total_weight:
		print(len(knapsack))
		print(' '.join([str(i + 1) for i in knapsack]))
	else:
		print(-1)


import sys
input = sys.stdin.readline

def main():
	(n, W) = map(int, input().split())
	wlst = list(map(int, input().split()))
	lower = (W + 1) // 2
	total = 0
	ans = []
	for (i, w) in enumerate(wlst, 1):
		if lower <= w <= W:
			print(1)
			print(i)
			return
		if w <= lower:
			total += w
			ans.append(i)
			if total >= lower:
				break
	else:
		print(-1)
		return
	ans.sort()
	print(len(ans))
	print(*ans)
for _ in range(int(input())):
	main()


for t in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	count = 0
	b = []
	flag = 0
	add = 0
	for i in range(n):
		if a[i] >= (w + 1) // 2 and a[i] <= w:
			flag = 1
			break
		elif a[i] < (w + 1) // 2:
			count += a[i]
			b.append(i + 1)
			add += 1
		if count >= (w + 1) // 2:
			flag = 2
			break
	if flag == 1:
		print(1)
		print(i + 1)
	elif flag == 2:
		print(add)
		for i in range(add):
			print(b[i], end=' ')
	else:
		print(-1)


from sys import stdin
import sys
tt = int(stdin.readline())
for loop in range(tt):
	(n, W) = map(int, stdin.readline().split())
	w = list(map(int, stdin.readline().split()))
	able = []
	nsum = 0
	for i in range(n):
		if w[i] > W:
			continue
		elif w[i] >= (W + 1) // 2:
			print(1)
			print(i + 1)
			break
		else:
			nsum += w[i]
			able.append(i + 1)
			if nsum >= (W + 1) // 2:
				print(len(able))
				print(*able)
				break
	else:
		print(-1)


t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	s = 0
	c = []
	f = False
	for i in range(n):
		if (W + 1) // 2 <= w[i] <= W:
			print(1)
			print(i + 1)
			f = True
			break
		elif w[i] < (W + 1) // 2:
			s += w[i]
			c.append(i + 1)
			if (W + 1) // 2 <= s <= W:
				print(len(c))
				print(*c)
				f = True
				break
	if not f:
		print(-1)


import math
x = int(input())
for i in range(0, x):
	(n, m) = [int(a) for a in input().split()]
	ar = list(map(int, input().split()))[:n]
	b = []
	s = 0
	t = 0
	for j in range(n):
		if ar[j] <= m and ar[j] >= math.ceil(m / 2):
			b = [j + 1]
			s = ar[j]
			break
		else:
			s = s + ar[j]
			if s > m:
				s = s - ar[j]
			else:
				b.append(j + 1)
				if s >= math.ceil(m / 2):
					break
	if s >= math.ceil(m / 2):
		print(len(b))
		print(*b)
	else:
		print(-1)


from sys import stdin, stdout
from math import ceil
for _ in range(int(stdin.readline())):
	(n, w) = list(map(int, stdin.readline().split()))
	a = list(map(int, stdin.readline().split()))
	l = []
	for i in range(n):
		if a[i] > w:
			continue
		l += [[a[i], i]]
	l.sort()
	n = len(l)
	p = -1
	sm = 0
	ans = []
	mnw = ceil(w / 2)
	for i in range(n):
		if mnw <= l[i][0] <= w:
			p = l[i][1] + 1
			break
	if n == 0 or l[0][0] > w:
		print(-1)
		continue
	if p != -1:
		print(1)
		print(p)
		continue
	f = 0
	for i in range(n - 1, -1, -1):
		sm += l[i][0]
		ans += [l[i][1] + 1]
		if mnw <= sm:
			f = 1
			break
	if f == 0:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


from math import ceil

def knap(arr, W):
	if min(arr) > W:
		return -1
	copy = sorted(arr, reverse=True)
	for i in copy:
		if i >= ceil(W / 2) and i <= W:
			print(1)
			return arr.index(i) + 1
	base = []
	count = 0
	for i in range(len(arr)):
		if count + arr[i] <= W:
			base.append(i + 1)
			count += arr[i]
	if count < ceil(W / 2):
		return -1
	print(len(base))
	for i in base:
		print(i, end=' ')
	return ''
t = int(input())
for i in range(t):
	(a, b) = map(int, input().strip().split())
	lst = list(map(int, input().strip().split()))
	print(knap(lst, b))


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2, floor
from bisect import bisect_right, bisect_left, bisect
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return list(factors)

def isPowerOfTwo(x):
	return x and (not x & x - 1)
MOD = 1000000007
PMOD = 998244353
N = 10 ** 9 + 7
LOGN = 30
T = 1
T = int(stdin.readline())
for _ in range(T):
	(n, w) = list(map(int, stdin.readline().rstrip().split()))
	l = list(map(int, stdin.readline().rstrip().split()))
	a = []
	for i in range(n):
		a.append([l[i], i + 1])
	a.sort(reverse=True)
	c = 0
	ans = []
	W = w
	for i in range(n):
		if w >= a[i][0]:
			c += a[i][0]
			w -= a[i][0]
			ans.append(a[i][1])
	if c >= ceil(W / 2):
		print(len(ans))
		print(*ans)
	else:
		print(-1)


import math
t = int(input())
for T in range(t):
	(n, w) = map(int, input().split())
	ws = map(int, input().split())
	goal = math.ceil(w / 2)
	wws = list(zip(ws, range(n)))
	wws.sort(reverse=True, key=lambda t: t[0])
	used = []
	sum = 0
	for W in wws:
		if W[0] <= w:
			sum += W[0]
			used.append(W[1] + 1)
			if sum >= goal:
				break
	if len(used) > 0 and goal <= sum:
		print(len(used))
		print(*used)
	else:
		print(-1)


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	b = []
	val = -1
	for i in range(n):
		b.append([a[i], i])
		if a[i] >= (w + 1) // 2 and a[i] <= w:
			val = i
	if val != -1:
		print(1)
		print(val + 1)
		continue
	b = sorted(b, key=lambda x: x[0])
	c = []
	curr = 0
	for i in range(n):
		curr += b[i][0]
		if curr > w:
			curr -= b[i][0]
			break
		else:
			c.append(b[i][1])
	if len(b) == 0 or curr < (w + 1) // 2 or curr > w:
		print(-1)
	else:
		print(len(c))
		for i in c:
			print(i + 1, end=' ')
		print()


import math
t = int(input())
for case in range(t):
	(n, W) = [int(x) for x in input().split(' ')]
	w = [int(x) for x in input().split(' ')]
	w = [(x, i) for (i, x) in enumerate(w)]
	w.sort()
	a = []
	a_sum = 0
	for z in w:
		if a_sum >= math.ceil(W / 2):
			break
		if z[0] > W:
			pass
		if math.ceil(W / 2) <= z[0] <= W:
			a = [z[1] + 1]
			a_sum = z[0]
		elif z[0] > W:
			pass
		else:
			a.append(z[1] + 1)
			a_sum += z[0]
	if a_sum >= math.ceil(W / 2):
		print(len(a))
		print(*a)
	else:
		print(-1)


t = int(input())
while t:
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	ans = 0
	flag = False
	arr = []
	for i in range(n):
		if 2 * w[i] >= W and w[i] <= W:
			arr = [i + 1]
			flag = True
			break
		elif w[i] > W:
			continue
		elif 2 * w[i] < W and 2 * (ans + w[i]) < W:
			arr.append(i + 1)
			ans += w[i]
		elif 2 * w[i] < W and 2 * (ans + w[i]) >= W:
			arr.append(i + 1)
			ans += w[i]
			flag = True
			break
		else:
			break
	if flag:
		print(len(arr))
		print(*arr)
	else:
		print(-1)
	t -= 1


import math
from collections import defaultdict

class Solution:

	def __init__(self):
		pass

	def run(self):
		(n, W) = [int(x) for x in input().split()]
		limit = int((W + 1) / 2)
		weights = [int(x) for x in input().split()]
		weights = sorted(enumerate(weights), key=lambda x: x[1])
		i = 0
		j = 0
		current = 0
		while j < n and i < n:
			current += weights[j][1]
			if current <= W:
				if current >= limit:
					print(j - i + 1)
					print(' '.join([str(x[0] + 1) for x in weights[i:j + 1]]))
					return
			else:
				while i <= j and current > W:
					current -= weights[i][1]
					i += 1
				if current >= limit:
					print(j - i + 1)
					print(' '.join([str(x[0] + 1) for x in weights[i:j + 1]]))
					return
			j += 1
		print(-1)
t = int(input())
s = Solution()
for i in range(t):
	s.run()


import math
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	t = []
	for (i, n) in enumerate(arr):
		t.append([n, i])
	t.sort(reverse=True)
	sum = 0
	ans = []
	for ele in t:
		if sum + ele[0] <= w:
			sum += ele[0]
			ans.append(ele[1] + 1)
	if sum >= math.ceil(w / 2):
		print(len(ans))
		print(*ans)
	else:
		print(-1)


import sys
import string
from heapq import *
from bisect import *
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from operator import *
from itertools import accumulate
inf = float('inf')
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
en = lambda x: list(enumerate(x, 1))
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())

def solve():
	(n, k) = r()
	arr = rr()
	arr = en(arr)
	arr.sort(key=lambda x: x[1], reverse=1)
	s = 0
	ans = []
	for (i, j) in arr:
		if s + j <= k:
			s += j
			ans += (i,)
		if s >= (k + 1) // 2:
			break
	x = len(ans)
	if x == 0 or s < (k + 1) // 2:
		print(-1)
		return
	print(len(ans))
	print(*ans)
for _ in range(ii()):
	solve()


rn = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rns = lambda : map(int, input().split())
rs = lambda : input()
yn = lambda x: print('Yes') if x else print('No')
YN = lambda x: print('YES') if x else print('NO')
for _ in range(rn()):
	(n, w) = rns()
	l = rl()
	for i in range(n):
		l[i] = [l[i], i + 1]
	l.sort()
	s = 0
	ans = []
	for i in range(n):
		s += l[i][0]
		ans.append(l[i][1])
		if s > w:
			if w >= l[i][0] >= w / 2:
				ans = [l[i][1]]
			else:
				ans = [-1]
			break
		elif s >= w / 2:
			break
	if s < w / 2:
		ans = [-1]
	if ans != [-1]:
		print(len(ans))
	print(*ans)


import sys
import math
from collections import defaultdict, Counter, deque
import os
import sys
from io import BytesIO, IOBase
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')
t = int(input())
for i in range(t):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	l = []
	for j in range(n):
		l.append([a[j], j + 1])
	l.sort()
	start = 0
	end = 0
	flag = 1
	cur = 0
	ans = deque()
	low = int(math.ceil(w / 2))
	while True:
		while cur > w:
			cur -= l[start][0]
			start += 1
			ans.popleft()
		if low <= cur:
			flag = 0
			break
		while cur < low:
			if end == n:
				break
			cur += l[end][0]
			ans.append(l[end][1])
			end += 1
		if low <= cur <= w:
			flag = 0
			break
		if cur < w and end == n:
			break
	if flag:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = [int(x) for x in input().split()]
	dic = {}
	for i in range(n):
		dic[i] = w[i]
	keys = sorted(dic, key=lambda x: dic[x])
	if dic[keys[0]] > W or sum(w) < W / 2:
		print(-1)
		continue
	else:
		res = []
		c = 0
		for key in keys[::-1]:
			if c + dic[key] <= W:
				res.append(key + 1)
				c += dic[key]
		if W / 2 <= c <= W:
			print(len(res))
			print(*res)
		else:
			print(-1)


for test in range(int(input())):
	(n, W) = list(map(int, input().split()))
	objects = list(map(int, input().split()))
	objects = list(enumerate(objects))
	objects.sort(key=lambda x: x[1], reverse=True)
	summa = 0
	indexes = []
	for object in objects:
		if object[1] > W:
			continue
		elif summa >= W / 2:
			break
		else:
			summa += object[1]
			indexes.append(object[0] + 1)
	if float(summa) >= W / 2 and summa <= W:
		print(len(indexes))
		print(*indexes)
	else:
		print(-1)


import sys
from sys import stdin
tt = int(stdin.readline())
for _ in range(tt):
	(n, W) = map(int, stdin.readline().split())
	w = list(map(int, stdin.readline().split()))
	res = []
	key = -1
	s = 0
	for i in range(len(w)):
		if w[i] > W:
			continue
		elif w[i] >= W / 2:
			key = i + 1
			break
		s += w[i]
		res.append(str(i + 1))
		if s >= W / 2:
			break
	if key != -1:
		print(1)
		print(key)
		continue
	if s >= W / 2:
		print(len(res))
		print(' '.join(res))
		continue
	print(-1)


import sys, math
input = sys.stdin.readline
ri = lambda : int(input())
rl = lambda : list(map(int, input().split()))
rs = lambda : input()
for _ in range(ri()):
	(n, w) = rl()
	items = rl()
	s = 0
	index = []
	for i in range(n):
		if items[i] > w:
			continue
		if items[i] * 2 >= w:
			index = [i + 1]
			s = items[i]
		elif s + items[i] <= w:
			s += items[i]
			index.append(i + 1)
	if s < math.ceil(w / 2):
		print(-1)
		continue
	print(len(index))
	print(*index)


from sys import stdin, stdout
input = stdin.readline
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	ves = tuple(map(int, input().split()))
	ids = sorted(zip(ves, range(1, n + 1)))
	mi = w / 2
	i = 0
	took = []
	s = 0
	while s < mi and i < n:
		s += ids[i][0]
		took.append(ids[i][1])
		i += 1
	while s > w and i > 1:
		i -= 1
		s -= ids[i - 1][0]
		took.remove(ids[i - 1][1])
	if not mi <= s <= w:
		print(-1)
	else:
		print(i)
		print(*took)


from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
for i in range(ip()):
	(n, w) = ei()
	li = ai()
	temp = []
	ans = 0
	for i in range(n):
		if li[i] >= ceil(w / 2) and li[i] <= w:
			temp = [i + 1]
			ans = li[i]
			break
		else:
			ans += li[i]
			if ans > w:
				ans -= li[i]
			else:
				temp.append(i + 1)
				if ans >= ceil(w / 2):
					break
	if ans >= ceil(w / 2):
		print(len(temp))
		print(*temp)
	else:
		print(-1)


import sys
input = lambda : sys.stdin.readline().strip()
inp = lambda : list(map(int, sys.stdin.readline().strip().split()))
for _ in range(int(input())):
	(n, w) = inp()
	a = [[int(s), i + 1] for (s, i) in zip(input().split(), range(n))]
	a = sorted(a, key=lambda x: -x[0])
	ans = []
	val = 0
	tar = (w - 1) // 2 + 1
	for i in range(n):
		if a[i][0] <= w:
			ans.append(a[i][1])
			val += a[i][0]
		if val >= tar:
			break
	else:
		print(-1)
		continue
	print(len(ans))
	ans.sort()
	print(*ans)


for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	arr = [[w[i], i + 1] for i in range(n)]
	arr.sort(key=lambda x: x[0], reverse=True)
	q = 0
	ll = []
	for i in range(n):
		if arr[i][0] + q <= W:
			q += arr[i][0]
			ll.append(arr[i][1])
	if q < (W + 1) // 2:
		print(-1)
	else:
		print(len(ll))
		print(*ll)


from math import ceil
T = int(input())
for t in range(T):
	(n, W) = list(map(int, input().split()))
	sum = 0
	lowLim = ceil(W / 2)
	found = False
	ans = []
	count = 0
	arr = list(map(int, input().split()))
	for i in range(n):
		if found:
			break
		inp = arr[i]
		if inp < W + 1:
			if inp >= lowLim and found == False:
				print(1)
				print(i + 1)
				found = True
				break
			elif inp < lowLim and found == False:
				ans.append(i + 1)
				sum += inp
				count += 1
				if (sum >= lowLim and sum <= W) and found == 0:
					print(len(ans))
					print(' '.join(map(str, ans)))
					found = True
					break
	if not found:
		print(-1)


import os
import sys
from io import BytesIO, IOBase
from collections import defaultdict
import math
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')
for _ in range(int(input())):
	(n, k) = map(int, input().split(' '))
	l = list(map(int, input().split(' ')))
	x = []
	for i in range(n):
		x.append([l[i], i + 1])
	x.sort()
	r = k // 2 + k % 2
	z = []
	for i in range(n):
		if r <= x[i][0] <= k:
			z.append(x[i][1])
			break
	if z:
		print(1)
		print(*z)
	else:
		z = []
		s = 0
		for i in range(n):
			if s >= r:
				break
			z.append(x[i][1])
			s += x[i][0]
		if r <= s <= k:
			print(len(z))
			print(*z)
		else:
			print(-1)


import math
t = int(input())
for _ in range(t):
	(n, k) = [int(i) for i in input().split()]
	a = [int(i) for i in input().split()]
	k2 = math.ceil(k / 2)
	flag = True
	for i in range(n):
		if a[i] >= k2 and a[i] <= k:
			print(1)
			print(i + 1)
			flag = False
			break
	if flag == False:
		continue
	t = 0
	b = []
	for i in range(n):
		if a[i] < k2:
			if t + a[i] <= k:
				t += a[i]
				b.append(i + 1)
			if t >= k2:
				print(len(b))
				for j in b:
					print(j, end=' ')
				print()
				flag = False
				break
	if flag == False:
		continue
	print(-1)


for _ in range(int(input())):
	(N, W) = [int(i) for i in input().split(' ')]
	A = [int(i) for i in input().split(' ')]
	limit = 0
	if W % 2 == 1:
		limit = (W + 1) // 2
	else:
		limit = W // 2
	B = []
	Hai = False
	for i in range(N):
		if A[i] >= limit and A[i] <= W:
			Hai = True
			B += [i + 1]
			break
	if Hai:
		print(1)
		print(B[0])
	else:
		sum = 0
		ho = False
		for i in range(N):
			if sum + A[i] < limit:
				sum += A[i]
				B += [i + 1]
			elif sum + A[i] >= limit and sum + A[i] <= W:
				sum += A[i]
				B += [i + 1]
				ho = True
				break
		if ho:
			print(len(B))
			for i in range(len(B)):
				print(B[i], end=' ')
			print()
		else:
			print(-1)


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l = map(int, input().split())
	th = -(-w // 2)
	sol = []
	lower = 0
	done = False
	for (i, v) in enumerate(l):
		if v > w:
			continue
		if v > th:
			sol = [i]
			done = True
			break
		else:
			sol.append(i)
			lower += v
			if lower >= th:
				done = True
				break
	if not done:
		print(-1)
	else:
		print(len(sol))
		print(' '.join([str(i + 1) for i in sol]))


import math
t = int(input())
while t:
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	li = []
	for i in range(len(a)):
		li.append([a[i], i])
	li.sort()
	sort_index = []
	for x in li:
		sort_index.append(x[1])
	ans = []
	val = 0
	sort_index = sort_index[::-1]
	for i in sort_index:
		if val + a[i] <= m:
			val += a[i]
			ans.append(i + 1)
	if val >= math.ceil(m / 2):
		print(len(ans))
		ans.sort()
		for i in ans:
			print(i, end=' ')
		print()
	else:
		print('-1')
	t -= 1


import math
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	check = []
	s = 0
	temp = math.ceil(w / 2)
	i = 0
	while i < n:
		if temp <= arr[i] <= w:
			check = [i + 1]
			break
		elif arr[i] < temp:
			s += arr[i]
			check.append(i + 1)
			if temp <= s <= w:
				break
		i += 1
	if i == n and (not temp <= s <= w):
		print(-1)
	else:
		l = len(check)
		if l == 0:
			print(-1)
		else:
			print(l)
			[print(j, end=' ') for j in check]
			print('')


from sys import stdin, stdout
for __ in range(int(stdin.readline().strip())):
	(n, r) = map(int, stdin.readline().strip().split())
	x = sorted([(int(num), i) for (i, num) in enumerate(stdin.readline().strip().split())], key=lambda t: t[0])
	s = 0
	condn = False
	minm = r // 2 if r % 2 == 0 else r // 2 + 1
	stack = []
	for j in x:
		if s + j[0] <= r:
			stack.append(j)
			s += j[0]
		elif s >= minm and s <= r:
			condn = True
			break
		else:
			while stack and s + j[0] > r:
				s -= stack[-1][0]
				stack.pop()
			if not stack:
				if s + j[0] >= minm and s + j[0] <= r:
					stack.append(j)
					condn = True
					break
				else:
					break
			else:
				stack.append(j)
				condn = True
				break
		if s >= minm and s <= r:
			condn = True
			break
	if condn:
		stdout.write(f'{len(stack)}\n')
		t = []
		for i in stack:
			t.append(f'{i[1] + 1} ')
		stdout.write(' '.join(t) + '\n')
	else:
		stdout.write('-1\n')


t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	for i in range(n):
		if w <= a[i] * 2 <= w * 2:
			print(1)
			print(i + 1)
			break
	else:
		t = 0
		res = []
		for i in range(n):
			if a[i] * 2 <= w:
				t += a[i]
				res.append(i + 1)
			if w <= t * 2 <= w * 2:
				print(len(res))
				print(*res)
				break
		else:
			print(-1)


t = int(input())

def solve():
	(n, w) = map(int, input().split())
	arr = list(map(int, input().split()))
	arr = [[arr[i], i] for i in range(n)]
	arr.sort()
	bag = []
	s = 0
	for i in arr:
		if s + i[0] <= w:
			s += i[0]
			bag.append(str(i[1] + 1))
		else:
			break
	if s >= w / 2:
		print(len(bag))
		print(' '.join(bag))
	else:
		bag = []
		s = 0
		arr.reverse()
		for i in arr:
			if s + i[0] <= w:
				s += i[0]
				bag.append(str(i[1] + 1))
		if s >= w / 2:
			print(len(bag))
			print(' '.join(bag))
		else:
			print(-1)
for i in range(t):
	solve()


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	(n, W) = map(int, input().split())
	A = list(map(int, input().split()))
	MIN = (W + 1) // 2
	LIST = []
	SUM = 0
	ANS1 = -1
	for i in range(n):
		if MIN <= A[i] <= W:
			ANS1 = i + 1
			break
		elif A[i] < MIN and SUM + A[i] <= W:
			LIST.append(i + 1)
			SUM += A[i]
	if ANS1 != -1:
		print(1)
		print(ANS1)
		continue
	if MIN <= SUM <= W:
		print(len(LIST))
		print(*LIST)
	else:
		print(-1)


from math import *
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	a = [(int(x), i) for (i, x) in enumerate(input().split())]
	a.sort()
	sack = []
	weight = 0
	c = w // 2 + w % 2
	for (v, i) in reversed(a):
		if v + weight <= w:
			weight += v
			sack.append(i + 1)
	if c <= weight:
		print(len(sack))
		print(*sack)
	else:
		print(-1)


import math
t = int(input())
for _ in range(t):
	(n, w) = [int(i) for i in input().split()]
	l = [int(i) for i in input().split()]
	s = 0
	flag = 0
	index = []
	for i in range(n):
		if l[i] <= w:
			if l[i] >= math.ceil(w / 2):
				print(1)
				print(i + 1)
				flag = 1
				break
			else:
				s += l[i]
				index.append(i + 1)
				if s >= math.ceil(w / 2):
					break
	if flag == 0:
		if s >= math.ceil(w / 2):
			print(len(index))
			for i in index:
				print(i, end=' ')
			print()
		else:
			print('-1')


from collections import defaultdict
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	ex = (w + 1) // 2
	gg = False
	for i in range(n):
		if a[i] >= ex and a[i] <= w:
			gg = True
			print(1)
			print(i + 1)
			break
	if gg:
		continue
	summ = 0
	ll = []
	ans = False
	for i in range(n):
		if summ + a[i] <= w:
			summ += a[i]
			ll.append(i + 1)
		if summ >= ex:
			ans = True
			break
	if ans:
		print(len(ll))
		print(*ll)
	else:
		print(-1)


t = int(input())
for p in range(t):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	h = (w + 1) // 2
	s = 0
	b = []
	for i in range(n):
		if h <= a[i] <= w:
			print(1)
			print(i + 1)
			break
		elif a[i] < h:
			s += a[i]
			b.append(i + 1)
			if s >= h:
				print(len(b))
				print(*b)
				break
	else:
		print(-1)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(y, x) = map(int, input().split())
	(*li,) = map(int, input().split())
	ans = x
	li1 = []
	for i in range(y):
		if (x + 1) // 2 <= li[i] <= x:
			print(1)
			print(i + 1)
			break
		if li[i] <= ans:
			li1 += [i + 1]
			ans -= li[i]
		if ans <= x // 2:
			print(len(li1))
			print(*li1)
			break
	else:
		print(-1)


import math
t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	ws = list(map(int, input().split()))
	C = math.ceil(W / 2)
	i = 0
	resultado = ''
	total = 0
	soma = 0
	valid = 1
	while i < n:
		if W >= ws[i] >= C:
			resultado = i + 1
			total = 1
			print(total)
			print(resultado)
			valid = 0
			break
		elif ws[i] < W:
			soma += ws[i]
			resultado += str(i + 1) + ' '
			total += 1
			if W >= soma >= C:
				print(total)
				print(resultado)
				valid = 0
				break
		i += 1
	if valid:
		print(-1)


import sys
t = int(input())
for num in range(t):
	(n, W) = map(int, sys.stdin.readline().split())
	items = list(map(int, sys.stdin.readline().split()))
	dic = {}
	for num in range(n):
		if items[num] not in dic:
			dic[items[num]] = [str(num + 1)]
		else:
			dic[items[num]].append(str(num + 1))
	items.sort(reverse=True)
	current = 0
	answer = []
	for item in items:
		if item <= W:
			current += item
			answer.append(dic[item].pop())
			if current >= W / 2:
				break
	if current < W / 2:
		print(-1)
	else:
		print(len(answer))
		print(' '.join(answer))


def solve():
	(n, w) = (int(x) for x in input().split())
	weights = [(int(x), i) for (i, x) in enumerate(input().split())]
	weights = [x for x in weights if x[0] <= w]
	for (x, i) in weights:
		if x >= (w + 1) // 2:
			print(1)
			print(i + 1)
			return
	curr_sum = 0
	curr_ans = []
	for (x, i) in weights:
		if curr_sum < (w + 1) // 2:
			curr_sum += x
			curr_ans.append(i + 1)
		else:
			break
	if curr_sum < (w + 1) // 2:
		print(-1)
		return
	print(len(curr_ans))
	print(*curr_ans)
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	(n, W) = [int(x) for x in input().split()]
	k = W
	w = sorted(enumerate([int(x) for x in input().split()]), key=lambda x: x[1])
	ans = []
	for i in range(n - 1, -1, -1):
		if W >= w[i][1]:
			ans.append(w[i][0] + 1)
			W -= w[i][1]
	if W <= k / 2:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


import math
for _ in range(int(input())):
	(n, weight) = [int(c) for c in input().split()]
	weight_half = math.ceil(weight / 2)
	arr = [int(c) for c in input().split()]
	s = 0
	c = []
	for (j, i) in enumerate(arr):
		if i > weight:
			continue
		elif i < weight_half:
			c.append(j + 1)
			s += i
			if s >= weight_half:
				break
		elif i >= weight_half:
			c = [j + 1]
			s = i
			break
	if s >= weight_half and s <= weight:
		print(len(c))
		print(*c)
	else:
		print(-1)


import sys, functools, collections, bisect, math, heapq
input = sys.stdin.readline
sys.setrecursionlimit(300000)
mod = 998244353
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().strip().split())
	arr = list(map(int, input().strip().split()))
	curr = math.ceil(w / 2)
	a = []
	for i in range(n):
		a.append((arr[i], i + 1))
	a.sort()
	ind = bisect.bisect_left(a, (curr, 0))
	if ind < n and a[ind][0] <= w:
		print(1)
		print(a[ind][1])
		continue
	b = []
	s = 0
	for i in range(ind):
		b.append(str(a[i][1]))
		s += a[i][0]
		if s >= curr:
			print(len(b))
			print(' '.join(b))
			break
	else:
		print(-1)


for _ in range(int(input())):
	(n, W) = map(int, input().split())
	b = []
	[b.append([v, i + 1]) for (i, v) in enumerate(map(int, input().split()))]
	b.sort(reverse=True)
	w = W
	a = []
	for (v, i) in b:
		if v <= w:
			a.append(i)
			w -= v
		if w <= W // 2:
			break
	if w <= W // 2:
		print(len(a))
		print(*a)
	else:
		print(-1)


import sys
import math as m

def fi():
	return sys.stdin.readline()
for _ in range(int(fi())):
	(n, w) = map(int, fi().split())
	l = list(map(int, fi().split()))
	a = [w]
	p = []
	for i in range(n):
		p.append([l[i], i + 1])
	p.sort()
	for i in range(n - 1, -1, -1):
		if a[0] >= p[i][0]:
			a[0] -= p[i][0]
			a.append(p[i][1])
	if 2 * a[0] > w:
		print(-1)
	else:
		print(len(a) - 1)
		print(*a[1:])


import math
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = [int(i) for i in input().split()]
	index = dict()
	for i in range(n):
		if arr[i] in index:
			index[arr[i]].append(i)
		else:
			index[arr[i]] = [i]
	ans = list()
	temp = arr[:]
	temp.sort()
	wt = 0
	counter = 0
	while wt <= w and counter < n:
		if wt + temp[counter] <= w:
			wt += temp[counter]
			ans.append(temp[counter])
		elif wt >= math.ceil(w / 2):
			break
		elif temp[counter] <= w and temp[counter] > wt:
			wt = temp[counter]
			ans = [temp[counter]]
		counter += 1
	if wt >= math.ceil(w / 2):
		print(len(ans))
		for i in ans:
			print(index[i][-1] + 1, end=' ')
			index[i].pop()
		print()
	else:
		print('-1')


for _ in range(int(input())):
	(n, w) = [int(i) for i in input().split()]
	wtmp = list(map(int, input().split()))
	weight = []
	for i in range(n):
		weight.append([wtmp[i], i])
	weight.sort()
	if w % 2 == 0:
		l = w // 2
	else:
		l = w // 2 + 1
	anyone = 0
	ch = -2
	for i in range(n):
		if ch == -2 and weight[i][0] > l:
			ch = i - 1
		if weight[i][0] >= l and weight[i][0] <= w:
			anyone = 1
			ans = weight[i][1]
			break
	if anyone == 1:
		print(1)
		print(ans + 1)
	else:
		if ch == -2:
			ch = n - 1
		if ch < 0:
			print(-1)
		else:
			ans = 0
			ls = []
			for i in range(ch, -1, -1):
				ans += weight[i][0]
				ls.append(weight[i][1])
				if ans >= l and ans <= w:
					break
			if ans < l:
				print(-1)
			else:
				print(len(ls))
				for i in ls:
					print(i + 1, end=' ')
				print()


import sys
import math
import itertools
original_stdout = sys.stdout
var_for_sublime = False
if var_for_sublime:
	fin = open('input.txt', 'r')
	fout = open('output.txt', 'w')
	sys.stdout = fout

	def give_string():
		return fin.readline().strip()
else:
	fin = sys.stdin
	fout = sys.stdout

	def give_string():
		return fin.buffer.readline().strip()

def give_list():
	return list(map(int, give_string().split()))

def give_int():
	return int(give_string())
MOD = 1000000000.0 + 7

def modpow(a, p):
	ans = 1
	while p:
		if p & 1:
			ans *= a
			ans %= MOD
		p >>= 1
		a *= a
		a %= MOD
	return ans

def fac_cal(n):
	ans = 1
	for i in range(1, n + 1):
		ans *= i
		ans %= MOD
	return ans

def solve():
	(n, W) = give_list()
	w = give_list()
	sorted_w = []
	for i in range(n):
		tl = []
		tl.append(w[i])
		tl.append(i + 1)
		temp = tuple(tl)
		sorted_w.append(temp)
	new_W = sorted(sorted_w, key=lambda x: x[0])
	i = 0
	st = 0
	curr_weight = 0
	while i <= st and st < n:
		if curr_weight < math.ceil(W / 2.0):
			curr_weight += new_W[st][0]
			st += 1
		elif curr_weight >= math.ceil(W / 2.0) and curr_weight <= W:
			break
		else:
			curr_weight -= new_W[i][0]
			i += 1
	toElement = 0
	while i < st and curr_weight > W:
		curr_weight -= new_W[i][0]
		i += 1
	ind = []
	if curr_weight >= math.ceil(W / 2.0) and W >= curr_weight:
		while i < st:
			ind.append(new_W[i][1])
			toElement += 1
			i += 1
		print(toElement)
		print(*ind)
	else:
		print(-1)

def Hey_Yashwant():
	try:
		t = 1
		t = give_int()
		for i in range(t):
			solve()
	finally:
		fin.close()
		fout.close()
		sys.stdout = original_stdout
Hey_Yashwant()


def getkey(a):
	return a[0]
t = int(input())
for i in range(t):
	found = False
	x = input().split()
	n = int(x[0])
	W = int(x[1])
	M = W // 2
	if W % 2 == 1:
		M += 1
	x = input().split()
	w = []
	for j in range(n):
		v = int(x[j])
		if v <= W:
			if v >= M:
				print(1)
				print(j + 1)
				found = True
				break
			w.append((v, j + 1))
	if not found:
		w.sort(key=getkey)
		n = len(w)
		j = n - 1
		sw = 0
		a = [0] * n
		while j >= 0 and sw < M:
			sw += w[j][0]
			a[j] = 1
			j -= 1
		if sw >= M:
			count = 0
			b = []
			for j in range(n):
				if a[j] == 1:
					count += 1
					b.append(w[j][1])
			print(count)
			for j in range(len(b) - 1):
				print(b[j], end=' ')
			print(b[len(b) - 1])
		else:
			print(-1)


import math
from collections import *
from functools import lru_cache
import bisect
from itertools import *
from heapq import *
inf = float('inf')
ninf = -float('inf')
ip = input
alpha = 'abcdefghijklmnopqrstuvwxyz'

def ipl():
	return list(map(int, input().split()))

def ipn():
	return int(input())

def ipf():
	return float(input())

def solve():
	(n, w) = ipl()
	a = ipl()
	s = 0
	l = []
	for (j, i) in enumerate(a):
		if i > w:
			continue
		if math.ceil(w / 2) <= i <= w:
			print(1)
			print(j + 1)
			return
		s += i
		l.append(j + 1)
		if math.ceil(w / 2) <= s <= w:
			print(len(l))
			for i in l:
				print(i, end=' ')
			print()
			return
	print(-1)
for _ in range(int(input())):
	solve()


def solve(n, w, a):
	mat = []
	for i in range(n):
		if a[i] <= w:
			mat.append([a[i], i])
	mat.sort(reverse=True)
	res = []
	c = 0
	for i in range(len(mat)):
		if w / 2 <= mat[i][0] <= w:
			return [mat[i][1] + 1]
		c += mat[i][0]
		res.append(mat[i][1] + 1)
		if w / 2 <= c <= w:
			return res
	return [-1]
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	p = solve(n, w, a)
	if p[0] == -1:
		print(-1)
	else:
		print(len(p))
		print(*sorted(p))