Exclusive OR
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Given integers . For all in , you should determine the maximum value you can get if you repeatably choose exactly integers and calulate their XOR sum .
Please notice that you can choose one integer multiple times for one in this problem.

输入描述:

The first line contains one integer , denoting the number of given integers.
The second line contains integers .

输出描述:

One line containing  integers, where -th integer denotes the maximum value you can get if you repeatably choose  integers and calulate their XOR sum.
示例1

输入

复制
4
1 4 5 7

输出

复制
7 6 7 7

说明

{i = 1 : 7 = 7}
i = 2 : 7\oplus 1 = 6
i = 3 : 7\oplus 1 \oplus 1 = 7
i = 4 : 7\oplus 1 \oplus 4 \oplus 5 = 7