package no184; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; import java.util.NoSuchElementException; public class Main { public static void main(String[] args) { IO io = new IO(); int n = io.nextInt(); long[] a = io.nextLongArray(n); int used = 0; for(int i=60;i>=0;i--) { Arrays.sort(a); if ((a[n-1-used] >> i & 1) == 1) { for(int j=0;j> i & 1) == 1) { a[j] ^= a[n-1-used]; } } used++; } // System.out.println(i + ":" + Arrays.toString(a)); } long nonzero = 0; for(int i=0;i Integer.MAX_VALUE) { throw new NumberFormatException(); } return (int) nl; } public char nextChar() { if (!hasNext()) { throw new NoSuchElementException(); } return (char) readByte(); } public double nextDouble() { return Double.parseDouble(next());} public int[] nextIntArray(int n) { int[] a = new int[n]; for(int i=0;i