#ARC137D. [ARC137D] Prefix XORs
[ARC137D] Prefix XORs
Score : points
Problem Statement
You are given an integer sequence of length : , and an integer .
For each , find the value of after doing the operation below times.
- For every (), simultaneously, replace the value of with .
Here, denotes bitwise .
What is bitwise ?
The bitwise of non-negative integers and , , is defined as follows:
- When is written in base two, the digit in the 's place () is if exactly one of and is , and otherwise.
Generally, the bitwise \mathrm{XOR} of k integers p_1, p_2, p_3, \dots, p_k is defined as (\dots ((p_1 \oplus p_2) \oplus p_3) \oplus \dots \oplus p_k). We can prove that this value does not depend on the order of p_1, p_2, p_3, \dots p_k.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answers for respective values of , separated by spaces.
Each operation changes as follows.
- Initially: .
- After the first operation: .
- After the second operation: .