Given array of integers a1,a2,...,an. For the given value of x find such ai that x xor ai is maximum.
First line contains number n (n≤105) and number of queries q. Second line contains integers a1,a2,...,an (0≤ai≤1018). Each of the next q lines contains one number x (0≤x≤1018).
For each value of x print in a separate line such value ai that x xor ai is maximum.