In order to win over and get noticed by his favorite streamer Daenerys, Jon decides to donate a significant amount of money . Every donation made to Daenerys is of $at$ $least$ $1$ $beastcoin$ and is displayed on Daenerys's stream alongside any message written and is visible to every viewer.
After spotting that Daenerys had set out a target for the streaming day at minimum $X$   beastcoins, all her viewers would only donate amounts less than $X$ beastcoins. Jon decided to better all of them by straight out donating more than or equal to $X$ beastcoins. Further, he decides to write a message along with his special donation to leave her in awe. His message would be : "Crossing my donation with any other donation will only increase the value of my donation". By Crossing, he means to take the $XOR$ . 
But even for all his intellectual brilliance, money doesn't grow on trees for Jon. After all he is an underpaid employee in his fancy big name MNC. Unlike Daenerys's daily cash cow who makes videos of how she donated carelessly to other people, Jon has a budget and in this case too, he is looking for the minimum donation he needs to make.
Can you tell Jon the minimum amount he needs to donate to Daenerys so that he is able to credibly put out the above comment alongside the donation in order to HOPEFULLY win her over.

-----Input Format-----
- First line contain an interger $T$, which denotes number of testcases. Next $T$ lines contain single interger $X$.    

-----Output Format-----
- For every testcase print one integer, i.e. minimum donation Jon needs to make.

-----Constriants-----
- $ 1 \leq T \leq 100000 $ 
- $ 2 \leq X \leq 10^{18} $ 

-----Sample Input-----
2

3

7 

-----Sample Output-----
4

8

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
for _ in range(int(input(''))):
	n = int(input(''))
	x = bin(n)
	x = len(x) - 2
	if n == 2 ** (x - 1):
		print(n)
	else:
		print(2 ** x)


t = int(input())
don = 2
for i in range(t):
	x = int(input())
	n = 1
	while pow(2, n) < x:
		n += 1
	don = pow(2, n)
	print(don)


import math
read = lambda : list(map(int, input().strip.split()))
rs = lambda : int(input().strip())
t = rs()
ans = []

def find(x):
	i = 0
	x = x - 1
	while x:
		x = x >> 1
		i += 1
	return 1 << i
for i in range(t):
	n = rs()
	ans.append(find(n))
print('\n'.join([str(x) for x in ans]))


def nextPowerOf2(n):
	n -= 1
	n |= n >> 1
	n |= n >> 2
	n |= n >> 4
	n |= n >> 8
	n |= n >> 16
	n += 1
	return n
for _ in range(int(input())):
	print(nextPowerOf2(int(input())))


def nextPowerOf2(n, p):
	if n and (not n & n - 1):
		return n
	while p < n:
		p <<= 1
	return p
for _ in range(int(input())):
	print(nextPowerOf2(int(input()), 1))


def nextPowerOf2(n, count):
	if n and (not n & n - 1):
		return n
	while n != 0:
		n >>= 1
		count += 1
	return 1 << count
for _ in range(int(input())):
	print(nextPowerOf2(int(input()), 0))


def fun(n):
	b = bin(n - 1).replace('0b', '')
	if b.count('0') == 0:
		return n
	l = len(b)
	s = '1' * l
	return int(s, 2) + 1
for i in range(int(input())):
	n = int(input())
	print(fun(n))


import math
from math import log

def isPowerOfTwo(x):
	return x and (not x & x - 1)
n = int(input())
for _ in range(n):
	t = int(input())
	x = int(log(t) / log(2)) + 1
	if t == 1:
		print(2)
	elif not isPowerOfTwo(t):
		print(2 ** x)
	else:
		print(t)


try:
	x = int(input())
	for _ in range(x):
		a = int(input())
		i = 0
		while 2 ** i < a:
			i += 1
		print(2 ** i)
except:
	pass


import math
for _ in range(int(input())):
	x = int(input())
	ans = 2 ** math.ceil(math.log2(x))
	print(ans)


T = int(input())
for _ in range(T):
	X = int(input())
	ans = X.bit_length()
	if 2 ** (ans - 1) == X:
		print(2 ** (ans - 1))
		continue
	print(2 ** ans)


t = int(input())
for _ in range(t):
	n = int(input())
	st = bin(n)
	st = st[2:]
	x = len(st)
	if st.count('1') == 1:
		print(n)
	else:
		print(2 ** x)


import math
t = int(input())
for i in range(t):
	x = int(input())
	n = math.floor(math.log2(x)) + 1
	if x == 2 ** (n - 1):
		print(x)
	else:
		print(2 ** n)


T = int(input())
for i in range(T):
	X = input()
	binary = bin(int(X) - 1)[2:]
	print(2 ** len(binary))


t = int(input())
for _ in range(t):
	x = input()
	binary = bin(int(x) - 1)[2:]
	print(2 ** len(binary))


t = int(input())
c = []
for i in range(t):
	x = int(input())
	b = bin(x).replace('0b', '')
	b = str(b)
	ans = '1'
	ans += '0' * len(b)
	el = '1'
	el += '0' * (len(b) - 1)
	i = int(ans, 2)
	if el == b:
		c.append(x)
	else:
		c.append(i)
for k in c:
	print(k)


for i in range(int(input())):
	n = int(input())
	lens = len(str(bin(n))) - 2
	if str(bin(n)).count('1') == 1:
		lens -= 1
	print(1 << lens)


import math
for _ in range(int(input())):
	n = int(input())
	r = math.log2(n)
	if r != int(r):
		r = int(r)
		r = pow(2, r + 1)
	else:
		r = int(r)
		r = pow(2, r)
	print(r)


import math
for _ in range(int(input())):
	n = int(input())
	x = 1
	while x < n:
		x = x << 1
	print(x)


import math

def exp(x):
	return x > 0 and x & x - 1 == 0

def count(number):
	return int(math.log(number) // math.log(2) + 1)
for x in range(int(input())):
	x = int(input())
	a = exp(x)
	if a == True:
		print(x)
	else:
		b = count(x)
		print(2 ** b)


def is_xor_greater(a, n):
	if a ^ n > n:
		return True
	else:
		return False

def get_don(n):
	i = 1
	while True:
		if 2 ** i >= n:
			break
		else:
			i += 1
	return 2 ** i
for t in range(int(input())):
	n = int(input().strip())
	print(get_don(n))


t = int(input())
for w in range(0, t):
	x = int(input())
	x = x - 1
	for i in range(1, 60):
		if x < 2 ** i:
			print(2 ** i)
			break


pow2 = []
for i in range(61):
	pow2.append(1 << i)
for _ in range(int(input())):
	x = int(input())
	for i in range(61):
		if x <= pow2[i]:
			print(pow2[i])
			break


for _ in range(int(input())):
	x = int(input())
	n = 0
	t = 0
	while n < x:
		n = 2 ** t
		t += 1
	print(2 ** (t - 1))