We have N non-negative integers: A1,A2,…,AN.
Consider painting at least one and at most N−1 integers among them in red, and painting the rest in blue.
Let the beauty of the painting be the XOR of the integers painted in red, plus the XOR of the integers painted in blue.
Find the maximum possible beauty of the painting.