You are given an integer sequence .
The of a sequence is the smallest nonnegative integer that does not appear in the sequence. The symbol denotes bitwise XOR.
Choose integers to partition the sequence into nonempty contiguous segments. For each segment, define
Find the maximum possible value of .
The input is given from Standard Input in the following format:
For each test case, print the maximum possible XOR value on a separate line.
Each case is given in the following format:
| 3 | 26 | Every is either or . |
| 4 | 47 | No additional constraints. |