I am giving this problem a bad read probably.
I am wondering why is this solution not working.
cook your dish here
for tc in range(int(input())):
n,k = map(int,input().split(' '))
li = list(map(int,input().split()))
max_ = 0
for i in li:
for j in li:
if k^(i^j) > max_:
max_ = k^(i^j)
if k^0 > max_:
print(k^0)
else:
print(max_)