Given N non-negative integers, find the maximum XOR over all pairs of distinct elements.
You are given NNN numbers. Write a program that finds the two numbers whose XOR is the largest.
That is, among A1,A2,…,ANA_1, A_2, \dots, A_NA1,A2,…,AN, find the largest value of Ai⊕AjA_i \oplus A_jAi⊕Aj over all index pairs with i≠ji \neq ji=j.
The first line contains NNN (2≤N≤100,0002 \le N \le 100{,}0002≤N≤100,000).
The second line contains NNN numbers. Every number given in the input is a non-negative integer no greater than 1,000,000,0001{,}000{,}000{,}0001,000,000,000.
Print the XOR of the two numbers whose XOR is the largest on the first line.