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: ⌈ W/2⌉ ≤ C ≤ 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 ≤ t ≤ 10^4). Description of the test cases follows.

The first line of each test case contains integers n and W (1 ≤ n ≤ 200 000, 1≤ W ≤ 10^{18}). 

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

The sum of n over all test cases does not exceed 200 000.

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 ≤ j_i ≤ 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.

Example

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.

Source: codeforces | Difficulty: EASY
Tags: Greedy algorithms

Sorting

Constructive algorithms


Solutions:
t = int(input())
for h in range(t):
	(n, w) = map(int, input().split())
	Wt = w
	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)
	ans = []
	sumi = 0
	for i in range(n):
		if arr3[i][0] <= w:
			w -= arr3[i][0]
			sumi += arr3[i][0]
			ans.append(arr3[i][1])
		if Wt / 2 <= sumi <= Wt:
			break
	if Wt / 2 <= sumi <= Wt:
		print(len(ans))
		for i in ans:
			print(i, end=' ')
		print()
	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, 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()


import math
import sys
from collections import defaultdict, Counter
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	c = math.ceil(w / 2)
	arr = list(map(int, input().split()))
	locator = defaultdict(list)
	for i in range(n):
		locator[arr[i]].append(i + 1)
	indices = Counter(locator.keys())
	arr.sort()
	l = 0
	r = 0
	temp = arr[0]
	flag = 0
	while r < n and l <= r:
		if temp > w:
			temp -= arr[l]
			l += 1
		elif temp < c:
			if r < n - 1:
				r += 1
				temp += arr[r]
			else:
				break
		else:
			flag = 1
			break
	if flag == 0:
		print(-1)
		continue
	print(r - l + 1)
	for i in range(l, r + 1):
		x = arr[i]
		print(locator[x][indices[x] - 1], end=' ')
		indices[x] += 1
	print()


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 bisect import bisect
for i in range(int(input())):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	l3 = []
	for j in range(n):
		l3.append([l[j], j + 1])
	l3.sort()
	a = bisect(l3, [w, n + 1])
	l3 = l3[:a]
	l3.sort(reverse=True)
	c = 0
	x = -1
	for j in range(len(l3)):
		if w >= c + l3[j][0] >= (w + 1) // 2:
			x = j + 1
			break
		c += l3[j][0]
	l2 = []
	if x >= 0:
		for j in range(x):
			l2.append(l3[j][1])
		print(len(l2))
		print(*l2)
	else:
		print(-1)


t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	a = [int(i) for i in input().split()]
	c = []
	idxes = []
	for (i, num) in enumerate(a):
		if num <= w:
			c.append(num)
			idxes.append(i + 1)
	if not c:
		print(-1)
	elif sum(c) < w / 2:
		print(-1)
	elif sum(c) <= w:
		print(len(c))
		print(*idxes)
	else:
		res = zip(c, idxes)
		res = sorted(res)
		ans = []
		sm = 0
		i = len(res) - 1
		while i >= 0 and sm < w / 2:
			ans.append(res[i][1])
			sm += res[i][0]
			i -= 1
		print(len(ans))
		print(*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


import sys
from math import ceil, factorial, gcd
from collections import Counter, deque, defaultdict
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush, heapify
MOD = 10 ** 9 + 7
INF = float('inf')
rl = lambda : list(map(int, sys.stdin.readline().split()))
for _ in range(int(input())):
	(n, k) = rl()
	W = [(w, i + 1) for (i, w) in enumerate(rl())]
	W.sort(reverse=True)
	ans = 0
	res = []
	for (w, i) in W:
		if ans + w <= k:
			ans += w
			res.append(i)
		if ans >= ceil(k / 2):
			break
	if ans >= ceil(k / 2):
		print(len(res))
		print(*sorted(res))
	else:
		print(-1)


from collections import defaultdict, deque, Counter
from sys import stdin, stdout
from heapq import heappush, heappop
import math
import io
import os
import math
import bisect

def isPrime(x):
	for i in range(2, x):
		if i * i > x:
			break
		if x % i == 0:
			return False
	return True

def ncr(n, r, p):
	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

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

def power(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

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 * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def digits(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def ceil(n, x):
	if n % x == 0:
		return n // x
	return n // x + 1

def mapin():
	return map(int, input().split())
t = int(input())
for _ in range(t):
	(n, W) = mapin()
	w1 = [int(x) for x in input().split()]
	w = [[w1[i], i + 1] for i in range(n)]
	ans = []
	fl = 1
	te = 0
	for i in w:
		if i[0] >= math.ceil(W / 2) and i[0] <= W:
			ans.append(i[1])
			te += i[0]
			fl = 0
			break
	if fl:
		w.sort()
		temp = math.ceil(W / 2)
		for i in range(n):
			te += w[i][0]
			ans.append(w[i][1])
			if te >= temp:
				break
	if te <= W and te >= math.ceil(W / 2):
		print(len(ans))
		print(*ans)
	else:
		print(-1)


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)


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


t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	weights = [int(x) for x in input().split()]
	weights_index = zip(weights, list(range(1, n + 1)))
	weights_index = list(sorted(weights_index, reverse=True))
	used = []
	used_weight = 0
	for (weight, idx) in weights_index:
		if weight <= W:
			used_weight += weight
			used.append(idx)
		if used_weight >= W / 2:
			break
	if used_weight < W / 2:
		print('-1')
	else:
		print(len(used))
		print(' '.join([str(i) for i in sorted(used)]))


import math
t = int(input())
for _ in range(t):
	(n, w) = list(map(int, input().split()))
	c = math.ceil(w / 2)
	nums = list(map(int, input().split()))
	nums = [(num, index) for (index, num) in enumerate(nums)]
	nums = sorted(nums, key=lambda x: x[0])
	sum = 0
	indices = []
	for i in range(len(nums)):
		sum += nums[i][0]
		indices.append(nums[i][1] + 1)
		if c <= sum <= w:
			print(len(indices))
			print(*indices)
			break
		if sum > w:
			if w < nums[i][0]:
				print(-1)
				break
			elif c <= nums[i][0] <= w:
				print(1)
				print(nums[i][1] + 1)
				break
	else:
		print(-1)


for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	ans = []
	for (a, b) in enumerate(l):
		ans.append([b, a + 1])
	ans.sort(reverse=True)
	a = 0
	res = []
	for i in ans:
		if a + i[0] <= w:
			a += i[0]
			res.append(i[1])
	if a >= (w + 1) // 2:
		print(len(res))
		print(*res)
	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)


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


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 = []
	sumo = 0
	for i in array:
		if sumo + i[0] > w:
			continue
		else:
			sumo += i[0]
			ans.append(i[1])
			if sumo >= w / 2:
				break
	if sumo >= w / 2:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


from sys import stdin, stdout
t = int(stdin.readline())
for _ in range(t):
	(n, m) = map(int, stdin.readline().split())
	arr = list(map(int, stdin.readline().split()))
	di = []
	for i in range(n):
		if arr[i] <= m:
			di.append((arr[i], i + 1))
	di.sort()
	sumi = 0
	w = m // 2
	if m % 2 != 0:
		w += 1
	if len(di) == 0:
		print(-1)
		continue
	counter = 0
	res = []
	for i in range(len(di)):
		sumi += di[i][0]
		res.append(di[i][1])
		if sumi >= w and sumi <= m:
			print(i + 1)
			res.sort()
			print(*res)
			counter = 1
			break
		elif di[i][0] >= w and di[i][0] <= m:
			print(1)
			print(di[i][1])
			counter = 1
			break
	if counter == 0:
		print(-1)


import math, sys
from collections import defaultdict, Counter, deque
from functools import reduce
INF = float('inf')
MOD = int(1000000000.0) + 7

def solve():
	(n, w) = vars()
	arr = array()
	arr = sorted([(arr[i], i + 1) for i in range(n)], reverse=True)
	i = 0
	ans = []
	while i < n and arr[i][0] > w:
		i += 1
	if i < n and arr[i][0] >= (w + 1) // 2:
		print(1)
		print(arr[i][1])
		return
	elif i < n and arr[i][0] < (w + 1) // 2:
		j = i
		i = n - 1
		cap = 0
		while i >= j and cap < (w + 1) // 2:
			cap += arr[i][0]
			ans.append(arr[i][1])
			i -= 1
		if (w + 1) // 2 <= cap <= w:
			print(len(ans))
			print(*ans)
			return
		cap = 0
		ans = []
		while j < n and cap < (w + 1) // 2:
			cap += arr[j][0]
			ans.append(arr[j][1])
			j += 1
		if (w + 1) // 2 <= cap <= w:
			print(len(ans))
			print(*ans)
			return
	print(-1)
	return

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

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

def input():
	return sys.stdin.readline().rstrip('\n').strip()

def print(*args, sep=' ', end='\n'):
	first = True
	for arg in args:
		if not first:
			sys.stdout.write(str(sep))
		sys.stdout.write(str(arg))
		first = False
	sys.stdout.write(end)

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

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


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


from collections import defaultdict
import sys
t = int(input())
for i in range(t):
	(n, w) = map(int, input().split())
	a = [int(i) for i in input().split()]
	ind = defaultdict(list)
	for i in range(len(a)):
		ind[a[i]].append(i + 1)
	mina = (w + 1) // 2
	a.sort()
	(ans, suma) = ([], 0)
	for i in range(n):
		if suma + a[i] < mina:
			suma += a[i]
			ans.append(ind[a[i]][-1])
			ind[a[i]].pop()
		elif suma + a[i] >= mina and suma + a[i] <= w or suma + a[i] > w:
			suma += a[i]
			ans.append(ind[a[i]][-1])
			ind[a[i]].pop()
			break
	if suma >= mina and suma <= w:
		print(len(ans))
		print(*ans)
	else:
		ans.reverse()
		pq = len(ans)
		for i in range(pq):
			if suma - a[i] >= mina and suma - a[i] <= w:
				ans.pop()
				print(len(ans))
				print(*ans)
				break
			else:
				suma -= a[i]
				ans.pop()
		else:
			print(-1)


import sys

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

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for k in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for k in range(c)] for k in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

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

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** (-10)
for _ in range(INT()):
	(N, W) = MAP()
	target = ceil(W, 2)
	AI = [(a, i) for (i, a) in enumerate(LIST())]
	AI.sort(reverse=1)
	ans = []
	cur = 0
	for i in range(N):
		if cur + AI[i][0] <= W:
			cur += AI[i][0]
			ans.append(AI[i][1] + 1)
			if cur >= target:
				break
	else:
		print(-1)
		continue
	print(len(ans))
	print(*ans)


for t in range(int(input())):
	(n, w) = map(int, input().split())
	ms = [int(i) for i in input().split()]
	for i in range(n):
		ms[i] = [ms[i], i]
	ms.sort(reverse=True, key=lambda x: x[0])
	if w % 2 == 1:
		sr = w // 2 + 1
	else:
		sr = w // 2
	f = True
	ans = []
	summ = 0
	sch = 0
	for i in range(n):
		ch = ms[i][0]
		if ch >= sr and ch <= w:
			print(1)
			print(ms[i][1] + 1)
			f = False
			break
		if summ + ch <= w:
			ans.append(ms[i][1] + 1)
			sch += 1
			summ += ch
		if summ >= sr:
			print(sch)
			print(*ans)
			f = False
			break
	if f:
		print(-1)


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)


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


from math import ceil
t = int(input())
while t:
	t -= 1
	(n, w) = map(int, input().split())
	inp = [int(x) for x in input().split()]
	mid = ceil(w / 2)
	ans = -1
	v = []
	for i in range(n):
		v.append((inp[i], i + 1))
		if inp[i] >= mid and inp[i] <= w:
			ans = i + 1
	piz = []
	if ans != -1:
		print(1)
		print(ans)
	else:
		v.sort(key=lambda i: i[0])
		if v[0][0] > w:
			print(-1)
		else:
			sum = 0
			e = 0
			while sum < mid and e < n:
				sum += v[e][0]
				piz.append(v[e][1])
				e += 1
			if sum > w:
				print(-1)
			elif sum < mid:
				print(-1)
			else:
				print(len(piz))
				print(' '.join(map(str, piz)))


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):
	return ' '.join(list(map(str, a)))

def solve():
	(n, w) = M()
	a = L()
	r = (w + 1) // 2
	ans = []
	x = 0
	for i in range(n):
		if a[i] in range(r, w + 1):
			print(1, i + 1, sep='\n')
			break
		elif a[i] < r:
			x += a[i]
			ans += [i + 1]
			if x >= r:
				print(len(ans), pr(ans), sep='\n')
				break
	else:
		print(-1)
for _ in range(I()):
	solve()


import sys
input = iter(sys.stdin.read().splitlines()).__next__
t = int(input())
output = []
for _ in range(t):
	(n, W) = map(int, input().split())
	w = [int(i) for i in input().split()]
	w = [(w_i, i) for (i, w_i) in enumerate(w) if w_i <= W]
	if len(w) == 0:
		output.append('-1')
		continue
	w.sort(reverse=True)
	items = []
	weight = 0
	target = (W + 1) // 2
	for (w_i, i) in w:
		weight += w_i
		items.append(i + 1)
		if weight >= target:
			break
	else:
		output.append('-1')
		continue
	output.append(str(len(items)))
	output.append(' '.join(map(str, items)))
print(*output, sep='\n')


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 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()
	l = scanf(n)
	p = w // 2
	q = w % 2
	if q != 0:
		p += 1
	for i in range(n):
		if l[i] >= p and l[i] <= w:
			print(1)
			print(i + 1)
			return
	cnt = 0
	ans = []
	for i in range(n):
		ans.append([l[i], i + 1])
	ans.sort()
	res = []
	for i in range(n):
		cnt += ans[i][0]
		res.append(ans[i][1])
		if cnt >= p and cnt <= w:
			print(len(res))
			print(*res)
			break
	else:
		print(-1)
no_of_testcases = read_int()
for testcase in range(1, no_of_testcases + 1):
	solve()


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


t = int(input())
for q in range(t):
	ch = input()
	L = [int(i) for i in ch.split()]
	(n, m) = (L[0], L[1])
	ch = input()
	L2 = [int(i) for i in ch.split()]
	L = []
	for i in range(n):
		L.append((L2[i], i + 1))
	L.sort(reverse=True)
	test = False
	somme = 0
	I = []
	for i in range(n):
		somme += L[i][0]
		if somme > m:
			somme -= L[i][0]
		elif somme < m / 2:
			I.append(L[i])
		else:
			I.append(L[i])
			test = True
			break
	if test:
		print(len(I))
		ch = ''
		for i in I:
			ch += str(i[1]) + ' '
		print(ch)
	else:
		print(-1)


import math
t = int(input())
for _ in range(t):
	(n, upper) = map(int, input().split())
	lower = math.ceil(upper / 2)
	weights = list(map(int, input().split()))
	trimmed = list()
	found = False
	for i in range(n):
		if weights[i] > upper:
			continue
		elif weights[i] >= lower:
			found = True
			ans = i + 1
		else:
			trimmed.append([weights[i], i + 1])
	if found:
		print(1)
		print(ans)
		continue
	ans = list()
	t = 0
	for (w, p) in trimmed:
		t += w
	if t < lower:
		print(-1)
		continue
	r = 0
	count = 0
	for (w, p) in trimmed:
		if r >= lower:
			break
		count += 1
		ans.append(p)
		r += w
	print(count)
	for w in ans:
		print(w, end=' ')
	print()


import operator
import math

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

def solve(w, n, W):
	(indices, w_sorted) = zip(*sorted(enumerate(w), key=operator.itemgetter(1)))
	C = 0
	res = []
	for i in reversed(range(n)):
		if w_sorted[i] > W:
			continue
		if C + w_sorted[i] <= W:
			res.append(indices[i] + 1)
			C += w_sorted[i]
		if C >= math.ceil(W / 2):
			break
	if math.ceil(W / 2) <= C <= W:
		return res
	else:
		return []
for t in range(T):
	(n, W) = inlt()
	w = inlt()
	res = solve(w, n, W)
	if len(res) == 0:
		print(-1)
	else:
		print(len(res))
		print(*res)


for i in range(int(input())):
	(n, W) = map(int, input().split())
	c = list(map(int, input().split()))
	w = []
	for i in range(n):
		w.append([c[i], i])
	w.sort(key=lambda x: x[0])
	import math
	a = []
	ans = -1
	suma = 0
	need = math.ceil(W / 2)
	for i in range(n):
		if w[i][0] >= need and w[i][0] <= W:
			ans = w[i]
			a = [w[i][1] + 1]
			break
		else:
			suma += w[i][0]
			a.append(w[i][1] + 1)
			if suma > W:
				ans = -1
				break
			if suma >= need:
				ans = suma
				break
	if ans == -1:
		print(-1)
		continue
	print(len(a))
	if ans != -1:
		print(*a)


import math
for _ in range(int(input())):
	(n, w) = [int(x) for x in input().split()]
	l = [int(x) for x in input().split()]
	l = [(l[i], i) for i in range(n)]
	l.sort(reverse=True)
	lo = math.ceil(w / 2)
	hi = w
	s = 0
	ans = []
	for i in range(n):
		if l[i][0] <= w:
			s += l[i][0]
			ans.append(l[i][1] + 1)
			w -= l[i][0]
	if s < lo or s > hi:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


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


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()
	B = []
	for (i, j) in enumerate(A):
		B += [(j, i + 1)]
	A = B[:]
	A.sort()
	maxi = 0
	f = 0
	k = math.ceil(W / 2)
	Ans = []
	for (i, j) in A:
		maxi += i
		Ans += [j]
		if k <= maxi <= W:
			f = 1
			break
		elif maxi > W:
			break
	if f:
		print(len(Ans))
		print(*Ans)
		continue
	if maxi < k:
		print(-1)
		continue
	t = 0
	for i in range(n):
		if t + A[i][0] <= k:
			t += A[i][0]
			maxi -= A[i][0]
			Ans[i] = -1
		if maxi <= W:
			break
	if maxi > W:
		print(-1)
		continue
	print(len(Ans) - Ans.count(-1))
	for i in Ans:
		if i != -1:
			print(i, end=' ')
	print()


import math
T = int(input())

def f(w):
	return (w + w % 2) // 2
for t in range(T):
	(n, w) = map(int, input().split())
	a = list(map(int, input().split()))
	d = False
	b = sorted(range(n), key=lambda r: a[r])
	if min(a) > w:
		print(-1)
		d = True
		continue
	for i in range(n):
		if a[i] >= f(w) and a[i] <= w:
			print(1)
			print(i + 1)
			d = True
			break
	if d:
		continue
	a.sort()
	ans = 0
	anss = []
	for i in range(n - 1, -1, -1):
		if a[i] < f(w):
			ans += a[i]
			anss.append(str(b[i] + 1))
		if ans >= f(w):
			print(len(anss))
			print(' '.join(anss))
			d = True
			break
	if not d:
		print(-1)


from collections import deque
for t in range(int(input())):
	(n, W) = map(int, input().rstrip().split())
	arr = list(map(int, input().rstrip().split()))
	if min(arr) > W:
		print(-1)
	else:
		halfw = W / 2
		arr = [[j, i] for (i, j) in enumerate(arr)]
		arr.sort(reverse=1)
		runningsum = 0
		answer = deque()
		flag = 0
		for i in arr:
			if i[0] > W:
				continue
			runningsum += i[0]
			answer.append(i)
			if runningsum > W:
				runningsum -= answer.popleft()[0]
			if runningsum >= halfw and runningsum <= W:
				flag = 1
				break
		if flag == 1:
			answer = [str(x[1] + 1) for x in answer]
			print(len(answer))
			print(' '.join(answer))
		else:
			print(-1)


import sys
try:
	(sys.stdin, sys.stdout) = (open('in.txt', 'r'), open('out.txt', 'w'))
except:
	pass
ii1 = lambda : int(sys.stdin.readline().strip())
is1 = lambda : sys.stdin.readline().strip()
iia = lambda : list(map(int, sys.stdin.readline().strip().split()))
isa = lambda : sys.stdin.readline().strip().split()
from collections import Counter
from math import *
from random import sample, shuffle

def main():

	def printit(l, r):
		res = []
		for i in range(l, r + 1):
			res.append(new[i][1] + 1)
		print(len(res))
		res.sort()
		print(*res)
	(n, w) = iia()
	arr = iia()
	new = []
	for (key, val) in enumerate(arr):
		new.append((val, key))
	new.sort()
	s = 0
	first = 0
	last = 0
	res = 0
	l = ceil(w / 2)
	r = w
	for i in range(n):
		if l <= arr[i] <= r:
			print(1)
			print(i + 1)
			return
	for i in range(n):
		s += new[i][0]
		if l <= s <= r:
			printit(last, i)
			return
		elif s < l:
			continue
		else:
			while last <= i and s > r:
				s -= new[last][0]
				last += 1
				if l <= s <= r:
					printit(last, i)
					return
			if l <= s <= r:
				printit(last, i)
				return
	if l <= s <= r:
		printit(last, i)
		return
	print(-1)
for _ in range(ii1()):
	main()


import collections
import math
import collections
import sys
from functools import reduce
import decimal
sys.setrecursionlimit(10 ** 9)
decimal.getcontext().rounding = decimal.ROUND_HALF_UP
graphDict = collections.defaultdict
queue = collections.deque()

class Graphs:

	def __init__(self):
		self.graph = graphDict(list)

	def add_edge(self, u, v):
		self.graph[u].append(v)

	def dfs_utility(self, nodes, visited_nodes):
		visited_nodes.add(nodes)
		for neighbour in self.graph[nodes]:
			if neighbour not in visited_nodes:
				self.dfs_utility(neighbour, visited_nodes)
			else:
				return neighbour

	def dfs(self, node):
		Visited = set()
		self.dfs_utility(node, Visited)

	def bfs(self, node):
		visited = set()
		if node not in visited:
			queue.append(node)
			visited.add(node)
		while queue:
			parent = queue.popleft()
			print(parent)
			for item in self.graph[parent]:
				if item not in visited:
					queue.append(item)
					visited.add(item)

def rounding(n):
	return int(decimal.Decimal(f'{n}').to_integral_value())

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 inp():
	return sys.stdin.readline().strip()

def map_inp(v_type):
	return map(v_type, inp().split())

def list_inp(v_type):
	return list(map_inp(v_type))
for _ in range(int(inp())):
	(n, w) = map_inp(int)
	arr = list_inp(int)
	lower_bound = w / 2
	if min(arr) > w or sum(arr) < lower_bound:
		print(-1)
	else:
		ans = []
		ans1 = set()
		total = 0
		for i in range(n):
			if arr[i] > w:
				arr[i] = 0
			elif lower_bound <= arr[i] <= w:
				ans.append(i + 1)
				break
			else:
				total += arr[i]
				ans1.add(i + 1)
		if len(ans) > 0:
			print(len(ans))
			print(*ans)
		elif lower_bound <= total <= w:
			print(len(ans1))
			print(*ans1)
		elif total < lower_bound:
			print(-1)
		else:
			for i in range(n):
				if total - arr[i] >= lower_bound and arr[i] != 0:
					total -= arr[i]
					ans1.discard(i + 1)
				if lower_bound <= total <= w:
					break
			if lower_bound <= total <= w:
				print(len(ans1))
				print(*ans1)
			else:
				print(-1)


import math
t = int(input())
for _ in range(t):
	(n, w) = [int(i) for i in input().split()]
	temp = [int(i) for i in input().split()]
	weights = []
	for i in range(n):
		weights.append((temp[i], i))
	weights.sort(reverse=True)
	tot = 0
	target_min = int(math.ceil(w / 2))
	target_max = w
	ans = []
	flag = 0
	for i in range(n):
		if weights[i][0] + tot <= target_max:
			ans.append(weights[i][1] + 1)
			tot += weights[i][0]
		if target_min <= tot <= target_max:
			flag = 1
			break
	if flag == 0:
		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()))
	ans = []
	f = 1
	(p1, p2, p3) = (0, 0, 0)
	sp3 = 0
	for i in range(n):
		if a[i] > w:
			p1 += 0
		elif a[i] >= math.ceil(w / 2) and a[i] <= w:
			print(1)
			print(i + 1)
			f = 0
			break
		else:
			p3 += 1
			sp3 += a[i]
			ans.append(i + 1)
			if sp3 >= math.ceil(w / 2) and sp3 <= w:
				print(len(ans))
				print(*ans)
				f = 0
				break
	if f:
		if p1 == n or sp3 < w:
			print(-1)


tcase = int(input())

def input_as_list():
	return [int(t) for t in input().split()]
for _ in range(tcase):
	(n, W) = input_as_list()
	ar = input_as_list()
	lb = W // 2 + W % 2
	ub = W
	cand = [i for i in range(n) if lb <= ar[i] <= ub]
	if cand:
		print(1)
		print(cand.pop() + 1)
		continue
	pref_sum = 0
	ans = []
	for (x, i) in sorted(((x, i) for (i, x) in enumerate(ar))):
		pref_sum += x
		ans += [i + 1]
		if lb <= pref_sum <= ub:
			break
	else:
		print(-1)
		continue
	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()


import sys, math, cmath, time
start_time = time.time()

def solve():
	(n, w) = invr()
	a = inlt()
	qwqw = []
	ww = 0
	qw = 0
	for i in range(len(a)):
		if a[i] >= ceil(w, 2) and a[i] <= w:
			print(1)
			print(i + 1)
			qw = 1
			break
	if qw == 0:
		q = [[a[i], i + 1] for i in range(len(a))]
		q.sort()
		for i in range(len(q)):
			if q[i][0] >= ceil(w, 2):
				break
		else:
			i = len(q)
		qq = i - 1
		if qq >= 0:
			qwqw = [q[qq][1]]
			ww = q[qq][0]
			for i in range(qq):
				if ww + q[i][0] < w:
					qwqw.append(q[i][1])
					ww = ww + q[i][0]
				if ww >= ceil(w, 2) and ww <= w:
					qw = 1
					break
		if qw == 1:
			print(len(qwqw))
			print(*qwqw)
	if qw == 0:
		print(-1)

def main():
	global tt
	if not ONLINE_JUDGE:
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	t = 1
	t = inp()
	for tt in range(1, t + 1):
		solve()
	if not ONLINE_JUDGE:
		print('Time Elapsed :', time.time() - start_time, 'seconds')
		sys.stdout.close()

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

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

def insr():
	return input().strip()

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

def prints(a, qw=' '):
	sys.stdout.write(qw.join(map(str, a)) + '\n')

def counter(a):
	q = [0] * max(a)
	for i in range(len(a)):
		q[a[i] - 1] = q[a[i] - 1] + 1
	return q

def counter_elements(a):
	q = dict()
	for i in range(len(a)):
		if a[i] not in q:
			q[a[i]] = 0
		q[a[i]] = q[a[i]] + 1
	return q

def string_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 factorial(n, m=1000000007):
	q = 1
	for i in range(n):
		q = q * (i + 1) % m
	return q

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 prime_factors(n):
	q = []
	while n % 2 == 0:
		q.append(2)
		n = n // 2
	for i in range(3, int(n ** 0.5) + 1, 2):
		while n % i == 0:
			q.append(i)
			n = n // i
	if n > 2:
		q.append(n)
	return list(sorted(q))

def transpose(a):
	(n, m) = (len(a), len(a[0]))
	b = [[0] * n for i in range(m)]
	for i in range(m):
		for j in range(n):
			b[i][j] = a[j][i]
	return b

def power_two(x):
	return x and (not x & x - 1)

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

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 ncr(n, r):
	return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def npr(n, r):
	return math.factorial(n) // math.factorial(n - r)
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
	input = sys.stdin.readline
main()


from sys import stdin, stdout
import math
mp = lambda : map(int, stdin.readline().split())
li = lambda : list(map(int, stdin.readline().split()))
for _ in range(int(input())):
	(n, W) = mp()
	temp = W
	wts = li()
	lst = []
	found = False
	half = math.ceil(W / 2)
	s = 0
	for i in range(n):
		if W >= wts[i] >= half:
			lst = [i + 1]
			s = wts[i]
			break
		else:
			s += wts[i]
			if s > W:
				s -= wts[i]
			else:
				lst.append(i + 1)
				if s >= half:
					break
	if s >= half:
		print(len(lst))
		print(*lst)
	else:
		print(-1)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	(n, w) = [int(i) for i in input().split()]
	a = [int(i) for i in input().split()]
	w2 = w // 2
	if w % 2 == 1:
		w2 += 1
	dic = {}
	for i in range(n):
		dic[a[i]] = []
	for i in range(n):
		dic[a[i]].append(i + 1)
	a.sort(reverse=True)
	ans = []
	s = 0
	for i in range(n):
		if a[i] <= w:
			ans.append(dic[a[i]][-1])
			dic[a[i]].pop()
			s += a[i]
			if s >= w2:
				break
	if s < w2:
		print(-1)
	else:
		print(len(ans))
		print(*ans)


from collections import deque
import math
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	wt = list(map(int, input().split()))
	t = sum(wt)
	wt = list(enumerate(wt, 1))
	wt.sort(key=lambda x: x[1])
	hw = math.ceil(w / 2)
	if wt[0][1] > w or t < hw:
		print(-1)
		continue
	else:
		s = 0
		temp = 0
		ans = deque()
		q = deque()
		while temp < n:
			if s >= hw and s <= w:
				break
			s += wt[temp][1]
			q.append(wt[temp][1])
			ans.append(wt[temp][0])
			while s > w:
				s -= q.popleft()
				ans.popleft()
			temp += 1
		if s >= hw and s <= w:
			print(len(ans))
			print(*ans)
		else:
			print(-1)


import math
import sys
t = int(input())
for i in range(t):
	(n, w) = map(int, input().split())
	c = list(map(int, input().split()))
	b = []
	for j in range(n):
		b.append([c[j], j])
	b.sort()
	j = 0
	s = 0
	res = []
	p = math.ceil(w / 2)
	f = 0
	while j < n:
		if s + b[j][0] >= p and s + b[j][0] <= w:
			res.append(b[j][1] + 1)
			break
		elif s + b[j][0] > w:
			if b[j][0] > w:
				f = 1
				break
			else:
				res = [b[j][1] + 1]
				break
		s += b[j][0]
		res.append(b[j][1] + 1)
		j += 1
	if sum(c) < p:
		print(-1)
	elif f == 1:
		print(-1)
	else:
		print(len(res))
		print(*res)


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


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


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 os
import sys
from io import BytesIO, IOBase
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()) if True else 1):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	more = list()
	morep = list()
	lessp = list()
	less = list()
	for i in range(n):
		if l[i] > w:
			continue
		elif 2 * l[i] >= w:
			more.append(l[i])
			morep.append(i + 1)
		else:
			less.append(l[i])
			lessp.append(i + 1)
	if len(more):
		print(1)
		print(morep[0])
	elif len(less) > 1:
		sumsf = 0
		ans = list()
		f = True
		for i in range(len(less)):
			sumsf += less[i]
			ans.append(lessp[i])
			if 2 * sumsf >= w:
				print(len(ans))
				for j in range(len(ans)):
					print(ans[j], end=' ')
				print()
				f = False
				break
		if f:
			print(-1)
	else:
		print(-1)


for _ in range(int(input())):
	(n, W) = map(int, input().split())
	w = sorted(zip(map(int, input().split()), [i for i in range(n)]), reverse=True)
	C = 0
	ans = []
	for i in range(n):
		if w[i][0] <= W:
			C += w[i][0]
			ans.append(w[i][1] + 1)
		if W >= C >= W / 2:
			break
	la = len(ans)
	if la == 0 or C < W / 2:
		print(-1)
	else:
		print(la)
		for i in range(la):
			print(ans[i], end=' ')


import math
t = int(input())
for _ in range(t):
	(n, w) = map(int, input().split())
	li = list(map(int, input().split()))
	k = li.copy()
	k.sort()
	if k[0] > w:
		print(-1)
	elif sum(li) < w / 2:
		print(-1)
	else:
		temp = []
		f = 0
		for i in range(n):
			temp.append([i, li[i]])
		ans = []
		temp.sort(key=lambda x: x[1], reverse=True)
		s = 0
		for i in range(n):
			if temp[i][1] + s <= w:
				s += temp[i][1]
				ans.append(temp[i][0] + 1)
		if s < math.ceil(w / 2):
			print(-1)
		else:
			print(len(ans))
			print(*ans)


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 functools import reduce
import os
import sys
from collections import *
from decimal import *
from math import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

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

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

def inn():
	return int(input())

def svalue():
	return tuple(map(str, input().split()))

def parr():
	return [value() for i in range(n)]
mo = 1000000007
inf = 1e+18
div = 998244353
for _ in range(inn()):
	(n, w) = value()
	a = arr()
	res = []
	for i in range(n):
		res.append((a[i], i + 1))
	res.sort(key=lambda x: x[0], reverse=True)
	ans = []
	sm = 0
	for (i, j) in res:
		if sm + i <= w:
			ans += [j]
			sm += i
	if sm < ceil(w / 2):
		print(-1)
	else:
		ans.sort()
		print(len(ans))
		print(*ans)


import typing
import sys
import math
import collections
import bisect
import itertools
import heapq
import decimal
import copy
INF = 10 ** 20
MOD = 10 ** 9 + 7

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

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

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

def na1():
	return list(map(lambda x: int(x) - 1, sys.stdin.buffer.readline().split()))

def main():
	t = ni()
	for _ in range(t):
		(n, w) = ns()
		t = na()
		wi = []
		for i in range(n):
			wi.append([t[i], i + 1])
		wi.sort()
		floor = (w + 1) // 2
		total = 0
		res = []
		flg = False
		for i in range(n - 1, -1, -1):
			if total + wi[i][0] <= w:
				total += wi[i][0]
				res.append(wi[i][1])
			if floor <= total <= w:
				flg = True
				break
		if not flg:
			print(-1)
			continue
		else:
			print(len(res))
			res.sort()
			print(*res, sep=' ')
main()


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 sys import *
from bisect import *
from math import *
input = stdin.readline
for _ in range(int(input())):
	(n, w) = map(int, input().split())
	l = []
	for (j, i) in enumerate(map(int, input().split())):
		l.append((i, j + 1))
	l.sort()
	(val, indexes) = map(list, zip(*l))
	idx = min(bisect_left(val, w), n - 1)
	(tot, ans) = (0, [])
	for i in range(idx, -1, -1):
		if tot + val[i] <= w:
			tot += val[i]
			ans.append(indexes[i])
	if ans and ceil(w / 2) <= tot <= w:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


import math
for _ in range(int(input())):
	(n, m) = map(int, input().split())
	s = list(map(int, input().split()))
	a = []
	for i in range(len(s)):
		a.append((s[i], i + 1))
	a.sort(key=lambda a: a[0], reverse=True)
	w = 0
	arr = []
	for i in range(n):
		if m >= w + a[i][0]:
			w = w + a[i][0]
			arr.append(a[i][1])
	if w < (m + 1) // 2:
		print(-1)
	else:
		print(len(arr))
		print(*arr)


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:
			s = w
			r = (i,)
		if 2 * s >= w:
			print(len(r), *r)
			break
	else:
		print(-1)


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 sys
input = sys.stdin.readline
from itertools import groupby
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())

def HalfDead():
	(n, w) = R()
	half = (w + 1) // 2
	a = L()
	for (i, x) in enumerate(a):
		if x >= half and x <= w:
			print(1)
			print(i + 1)
			return
	a = sorted([(x, i) for (i, x) in enumerate(a) if x <= w])
	res = []
	sum = 0
	for (x, i) in a:
		sum += x
		res.append(i + 1)
		if sum >= half and sum <= w:
			print(len(res))
			print(*res)
			return
	print(-1)
for _ in range(I()):
	HalfDead()


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)


t = int(input())
for t1 in range(0, t):
	(n, w) = map(int, input().split())
	if w % 2 == 0:
		w2 = int(w / 2)
	else:
		w2 = int(w / 2) + 1
	mas1 = list(map(int, input().split()))
	mas = [(1, 1)] * n
	for i in range(0, n):
		mas[i] = (mas1[i], i + 1)
	mas.sort()
	su = 0
	fl = 0
	for i in range(0, n):
		su += mas[i][0]
		if su >= w2 and su <= w:
			print(i + 1)
			for j in range(0, i + 1):
				print(mas[j][1], end=' ')
			print()
			fl = 1
			break
		elif su >= w and mas[i][0] <= w:
			print(1)
			print(mas[i][1])
			fl = 1
			break
	if fl == 0:
		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)


import bisect
t = int(input())
for _ in range(t):
	(n, w) = list(map(int, input().split()))
	l = list(map(int, input().split()))
	a = []
	for i in range(n):
		a.append([l[i], i])
	a.sort()
	s = [0] * (n + 1)
	for i in range(1, n + 1):
		s[i] = s[i - 1] + a[i - 1][0]
	ans = []
	for i in range(n):
		j = bisect.bisect_right(s, s[i] + w)
		if s[j - 1] >= s[i] + w // 2 + w % 2:
			for x in range(i, j - 1):
				ans.append(a[x][1] + 1)
			break
	if ans == []:
		print(-1)
	else:
		ans.sort()
		print(len(ans))
		print(*ans)


t = int(input())
from collections import defaultdict
for _ in range(t):
	(n, w) = map(int, input().split())
	arr = list(map(int, input().strip().split()))[:n]
	sums = 0
	flag = 0
	ans = []
	for i in range(n):
		if arr[i] > w:
			continue
		if w / 2 <= arr[i] <= w:
			ans = [i + 1]
			flag = 1
			break
		elif w / 2 <= sums + arr[i] <= w:
			ans.append(1 + i)
			flag = 1
			break
		elif sums + arr[i] < w:
			ans.append(1 + i)
			sums += arr[i]
	if flag == 1:
		print(len(ans))
		for num in ans:
			print(num, end=' ')
		print()
	else:
		print(-1)


from bisect import *
from collections import *
from math import gcd, ceil, sqrt, floor, inf
from heapq import *
from itertools import *
from operator import add, mul, sub, xor, truediv, floordiv
from functools import *
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')

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

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

def N():
	return int(input())
from types import GeneratorType

def bootstrap(f, stack=[]):

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

def fact(x, mod=0):
	if mod:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr) % mod)
	else:
		while x >= len(farr):
			farr.append(farr[-1] * len(farr))
	return farr[x]

def ifact(x, mod):
	global ifa
	ifa.append(pow(farr[-1], mod - 2, mod))
	for i in range(x, 0, -1):
		ifa.append(ifa[-1] * i % mod)
	ifa = ifa[::-1]

def per(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return fact(i) // fact(i - j)
	return farr[i] * ifa[i - j] % mod

def com(i, j, mod=0):
	if i < j:
		return 0
	if not mod:
		return per(i, j) // fact(j)
	return per(i, j, mod) * ifa[j] % mod

def catalan(n):
	return com(2 * n, n) // (n + 1)

def linc(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t > f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rinc(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t < f(mid):
			r = mid - 1
		else:
			l = mid
	return l

def ldec(f, t, l, r):
	while l < r:
		mid = (l + r) // 2
		if t < f(mid):
			l = mid + 1
		else:
			r = mid
	return l

def rdec(f, t, l, r):
	while l < r:
		mid = (l + r + 1) // 2
		if t > f(mid):
			r = mid - 1
		else:
			l = mid
	return l

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

def binfun(x):
	c = 0
	for w in arr:
		c += ceil(w / x)
	return c

def lowbit(n):
	return n & -n

def inverse(a, m):
	a %= m
	if a <= 1:
		return a
	return (1 - inverse(m, a) * m) // a % m

class BIT:

	def __init__(self, arr):
		self.arr = arr
		self.n = len(arr) - 1

	def update(self, x, v):
		while x <= self.n:
			self.arr[x] += v
			x += x & -x

	def query(self, x):
		ans = 0
		while x:
			ans += self.arr[x]
			x &= x - 1
		return ans

class DSU:

	def __init__(self, n):
		self.c = [-1] * n

	def same(self, x, y):
		return self.find(x) == self.find(y)

	def find(self, x):
		if self.c[x] < 0:
			return x
		self.c[x] = self.find(self.c[x])
		return self.c[x]

	def union(self, u, v):
		(u, v) = (self.find(u), self.find(v))
		if u == v:
			return False
		if self.c[u] < self.c[v]:
			(u, v) = (v, u)
		self.c[u] += self.c[v]
		self.c[v] = u
		return True

	def size(self, x):
		return -self.c[self.find(x)]

class UFS:

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

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

	def union(self, u, v):
		(pu, pv) = (self.find(u), self.find(v))
		if pu == pv:
			return False
		if self.ranks[pu] >= self.ranks[pv]:
			self.parent[pv] = pu
			if self.ranks[pv] == self.ranks[pu]:
				self.ranks[pu] += 1
		else:
			self.parent[pu] = pv

def Prime(n):
	c = 0
	prime = []
	flag = [0] * (n + 1)
	for i in range(2, n + 1):
		if not flag[i]:
			prime.append(i)
			c += 1
		for j in range(c):
			if i * prime[j] > n:
				break
			flag[i * prime[j]] = prime[j]
			if i % prime[j] == 0:
				break
	return prime

def dij(s, graph):
	d = {}
	d[s] = 0
	heap = [(0, s)]
	seen = set()
	while heap:
		(dis, u) = heappop(heap)
		if u in seen:
			continue
		for v in graph[u]:
			if v not in d or d[v] > d[u] + graph[u][v]:
				d[v] = d[u] + graph[u][v]
				heappush(heap, (d[v], v))
	return d

def GP(it):
	return [(ch, len(list(g))) for (ch, g) in groupby(it)]

class DLN:

	def __init__(self, val):
		self.val = val
		self.pre = None
		self.next = None
t = N()
for i in range(t):
	(n, W) = RL()
	w = RLL()
	w = sorted([(x, i) for (i, x) in enumerate(w, 1)])
	thr = (W + 1) // 2
	ans = []
	res = 0
	flag = False
	for i in range(n - 1, -1, -1):
		if thr <= w[i][0] <= W:
			ans.append(w[i][1])
			flag = True
			break
		elif w[i][0] < thr:
			res += w[i][0]
			ans.append(w[i][1])
			if thr <= res <= W:
				flag = True
				break
	if flag:
		print(len(ans))
		print(*ans[::-1])
	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 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')


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


def bs(b, i, a, v):
	j = len(b) - 1
	while i <= j:
		mid = i + (j - i) // 2
		if b[mid] >= a and b[mid] <= v:
			return mid
		if b[mid] > a:
			j = mid - 1
		else:
			i = mid + 1
	return -1
t = int(input())
from math import ceil
for _ in range(t):
	(n, w) = map(int, input().split())
	l = list(map(int, input().split()))
	e = ceil(w / 2)
	k = []
	for i in range(n):
		k.append([l[i], i + 1])
	k.sort()
	b = [0]
	for i in k:
		b.append(b[-1] + i[0])
	flag = 0
	for i in range(len(b)):
		x = bs(b, i, e + b[i], w + b[i])
		if x == -1:
			pass
		else:
			m = []
			for j in range(i, x):
				m.append(k[j][1])
			print(len(m))
			print(*m)
			flag = 1
			break
	if not flag:
		print(-1)


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
solution = []
t = int(input())
for _ in range(t):
	(n, W) = map(int, input().split())
	w = list(map(int, input().split()))
	indeces = list(range(len(w)))
	mylist = zip(w, indeces)
	mylist = sorted(mylist, key=lambda x: x[0], reverse=True)
	half = math.ceil(W / 2)
	mysum = 0
	count = 0
	outpuntindex = []
	for (item, index) in mylist:
		if mysum + item <= W:
			mysum += item
			count += 1
			outpuntindex.append(index + 1)
	if mysum >= half:
		solution.append(count)
		solution.append(outpuntindex)
	else:
		solution.append(-1)
for s in solution:
	if type(s) is list:
		print(*s)
	else:
		print(s)


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)


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


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)


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)


import sys
from collections import deque
from copy import *
from bisect import *
from math import gcd, ceil, sqrt
from itertools import permutations as prm, product

def eprint(*args):
	print(*args, file=sys.stderr)
zz = 1
if zz:
	input = sys.stdin.readline
else:
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('all.txt', 'w')
di = [[-1, 0], [1, 0], [0, 1], [0, -1]]

def string(s):
	return ''.join(s)

def fori(n):
	return [fi() for i in range(n)]

def inc(d, c, x=1):
	d[c] = d[c] + x if c in d else x

def bo(i):
	return ord(i) - ord('A')

def li():
	return [int(xx) for xx in input().split()]

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

def comp(a, b):
	if a > b:
		return 2
	return 2 if a == b else 0

def gi():
	return [xx for xx in input().split()]

def gtc(tc, ans):
	print('Case #' + str(tc) + ':', ans)

def cil(n, m):
	return n // m + int(n % m > 0)

def fi():
	return int(input())

def pro(a):
	return reduce(lambda a, b: a * b, a)

def swap(a, i, j):
	(a[i], a[j]) = (a[j], a[i])

def si():
	return list(input().rstrip())

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

def gh():
	sys.stdout.flush()

def isvalid(i, j, n, m):
	return 0 <= i < n and 0 <= j < m

def bo(i):
	return ord(i) - ord('a')

def graph(n, m):
	for i in range(m):
		(x, y) = mi()
		a[x].append(y)
		a[y].append(x)
t = fi()
uu = t
while t > 0:
	t -= 1
	(n, w) = mi()
	a = li()
	b = []
	for i in range(n):
		b.append([a[i], i + 1])
	b.sort()
	c = 0
	r = []
	for i in range(n):
		c += b[i][0]
		if (w + 1) // 2 <= c <= w:
			for j in range(i + 1):
				r.append(b[j][1])
			break
		if c > w:
			if b[i][0] <= w:
				r.append(b[i][1])
			break
	if len(r):
		print(len(r))
		print(*r)
		continue
	print(-1)


import math

def find_sum(li, low, high, n):
	curr_sum = li[0]
	start = 0
	i = 1
	while i <= n:
		while curr_sum > high and start < i - 1:
			curr_sum -= li[start]
			start += 1
		if curr_sum >= low and curr_sum <= high:
			return (start, i - 1)
		if i < n:
			curr_sum += li[i]
		i += 1
	return (-1, -1)
for t in range(int(input())):
	(n, w) = map(int, input().split())
	arr = [int(x) for x in input().split()]
	my_dict = {}
	low = math.ceil(w / 2)
	high = w
	if sum(arr) < low or min(arr) > high:
		print(-1)
		continue
	for i in range(n):
		ele = arr[i]
		if ele in my_dict:
			my_dict[ele].append(i + 1)
		else:
			my_dict[ele] = [i + 1]
	li = sorted(arr)
	(i, j) = find_sum(li, low, high, n)
	if i == -1 or j == -1:
		print(-1)
		continue
	else:
		my_arr = []
		for x in range(i, j + 1):
			my_arr.append(my_dict[li[x]].pop(0))
		print(len(my_arr))
		my_arr.sort()
		print(*my_arr, 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 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)


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)


t = int(input())
for _ in range(t):
	(N, W) = map(int, input().split())
	weight = list(map(int, input().split()))
	ID = list(range(1, N + 1))
	c = zip(weight, ID)
	cc = sorted(c, reverse=True)
	ans = []
	A = 0
	isOK = False
	for i in range(N):
		if cc[i][0] > W:
			continue
		else:
			A += cc[i][0]
			ans.append(cc[i][1])
		if -(-W // 2) <= A and A <= W:
			isOK = True
			break
	if isOK:
		print(len(ans))
		print(*ans)
	else:
		print(-1)


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

def inar():
	return [int(el) for el in input().split()]

def main():
	t = int(input())
	for _ in range(t):
		(n, w) = inar()
		arr = inar()
		yes = True
		for i in range(n):
			if math.ceil(w / 2) <= arr[i] <= w:
				print(1)
				print(i + 1)
				yes = False
				break
		if yes == False:
			continue
		tup = []
		for i in range(n):
			tup.append([arr[i], i + 1])
		tup.sort()
		chota = []
		for i in range(n):
			if tup[i][0] < math.ceil(w / 2):
				chota.append([tup[i][0], tup[i][1]])
			else:
				break
		ans = []
		temp = 0
		for i in range(len(chota) - 1, -1, -1):
			temp += chota[i][0]
			ans.append(chota[i][1])
			if math.ceil(w / 2) <= temp <= w:
				break
		if math.ceil(w / 2) <= temp <= w:
			print(len(ans))
			print(*ans)
		else:
			print(-1)
main()


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

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

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

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions, statistics
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal
from sys import stdout
from heapq import heappush, heappop, heapify, _heapify_max, _heappop_max, nsmallest, nlargest

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	tc = ri()
	for _ in range(tc):
		(n, w) = ria()
		k = math.ceil(w / 2)
		a = ria()
		ai = []
		for i in range(n):
			ai.append([a[i], i + 1])
		ai = sorted(ai)
		ans = []
		s = 0
		t = 0
		g = 0
		h = 0
		for i in ai:
			if i[0] >= k and i[0] <= w:
				h = 1
				ans = [i[1]]
				break
			if s + i[0] > w:
				t = 1
				break
			s += i[0]
			ans.append(i[1])
			if s >= k:
				g = 1
				break
		if h:
			print(len(ans))
			print(*ans)
		elif g == 1 and t == 0:
			print(len(ans))
			print(*ans)
		else:
			print(-1)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			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, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			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()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

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

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()