MaximizingXor solution