You are given a set of distinct positive integers of size ( is always even). Print the minimum positive integer that is greater than 0 such that after replacing each element of the set with , set remains the same.
Print -1 if there is no such .
Note: It is guaranteed that is odd.
Input format
Output format
Print lines each containing a single line that contains .
By performing the XOR of k with each element we get the given set S
5⊕3=6
6⊕3=5
13⊕3=14
14⊕3=13
9⊕3=10
10⊕3=9
S' = {6,5,14,13,10,9} which is same as S={5,6,13,14,9,10}