Statement
Statement language
You are given an integer sequence of length .
There are queries. Each query gives an integer . The answer to the query is
where denotes the bitwise AND operation.
Print the answer to every query. Queries do not modify the sequence .
Input
The input is given from Standard Input in the following format:
Output
For each test case, print lines.
On the -th line, print for the -th query.
Constraints
- .
- .
- .
Subtasks
Samples
Input
2
3 4
5 2 7
0
1
6
7
2 3
8 3
10
7
15
Output
0
1
6
7
8
3
8
For the query in the first test case, the three values are , , and , so the answer is .