Chef has a circular sequence $A$ of $N$ non-negative integers $A_1, A_2, \ldots, A_N$ where $A_i$ and $A_{i+1}$ are considered adjacent, and elements $A_1$ and $A_N$ are considered adjacent.
An operation on position $p$ in array $A$ is defined as replacing $A_p$ by the bitwise OR of elements adjacent to $A_p$. Formally, an operation is defined as:
- If $p = 1$, replace $A_1$ with $A_N | A_{2}$
- If $1 < p < N$, replace $A_p$ with $A_{p-1} | A_{p+1}$
- If $p = N$, replace $A_N$ with $A_{N-1} | A_1$
Here, '|' denotes the bitwise OR operation.
Now, Chef must apply operations at each position exactly once, but he may apply the operations in any order.
Being a friend of Chef, you are required to find a sequence of operations, such that after applying all the $N$ operations, the bitwise OR of the resulting array is $K$, or determine that no such sequence of operations exist.

-----Input:-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains two space-separated integers $N$ and $K$ denoting the number of elements, and the required bitwise OR after operations.
- The second line contains $N$ space-separated integers $A_1, A_2, \ldots, A_N$.

-----Output:-----
For each test case, if no valid sequence of operations exist, print -1.
Otherwise, print $N$ space-separated integers in which $i$-th integer denote the position chosen in the $i$-th operation. If there are multiple valid sequences of operations, you may print any valid sequence.

-----Constraints-----
- $1 \le T \le 10^5$
- $3 \le N \le 2*10^5$
- $0 \le A_i, K \le 10^9$
- It's guaranteed that the total length of the arrays in one test file doesn't exceed $10^6$

-----Sample Input:-----
5
3 6
2 1 6
3 6
2 1 5
3 7
2 4 6
3 7
1 2 4
3 7
1 2 6

-----Sample Output:-----
2 1 3
-1
-1
-1
2 3 1

-----Explanation:-----
In the first test case, initially, the sequence is {2, 1, 6}. 
- Chef applies the operation on the $2^{nd}$ index, so the sequence converts to {2, 6, 6}.
- Next, Chef applies the operation on the $1^{st}$ index, so the sequence converts to {6, 6, 6}.
- Next, Chef applies the operation on the $3^{rd}$ index, and this time sequence does not change.
The final sequence is {6, 6, 6}, and bitwise OR of this sequence is $6$ that is equal to given $K$.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 't=int(input())\ndef check():\n    pref = [0]*n\n    pref[0]=a[0]\n    suff = [0]*n\n    suff[-1]=a[-1]\n    for i in range (1,n):\n        pref[i] = pref[i-1]|a[i]\n        suff[n-i-1] = suff[n-i]|a[n-i-1]\n    if suff[1]==k:\n        return 0\n    elif pref[n-2]==k:\n        return n-1\n    else:\n        for i in range (1,n-1):\n            if pref[i-1]|suff[i+1] == k:\n                return i\n        return -1\nwhile(t):\n    t-=1\n    n,k=[int(i) for i in input().split()]\n    a=[int(i) for i in input().split()]\n    ans = []\n    arr = [0]*n\n    for i in range (n):\n        if k|a[i] != k:\n            a[i] = a[i-1]|a[(i+1)%(n)]\n            ans.append(i+1)\n            arr[i]=1\n\n    x = 0\n    count = 0\n    for i in range (n):\n        x|=a[i]\n        \n    if x!= k:\n        print(-1)\n    else:\n        y = check()\n        if y == -1:\n            print(-1)\n        else:\n            for i in range (y,n+y):\n                if arr[i%n]==0:\n                    arr[i%n]==1\n                    ans.append((i%n)+1)\n            print(*ans)'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13443