You are given an array $A$ of n integers ($A_1$, $A_2$, ..., $A_n$) and some queries. In each query, you will be given an integer $D$. Your task is to find an integer $A_i$ ($1 ≤ i ≤ n$) such that XOR operation between $D$ and $A_i$ gives the maximum result. According to Wikipedia, "Exclusive or or exclusive disjunction is a logical operation that outputs true only when inputs differ (one is true, the other is false)".

Input

The first line contains an integer $n$ ($1 ≤ n ≤ 10^5$), the number of integers in the array. The next line contains n space-separated non-negative integers. Each of them is unique and less than $2^{31}$. The next line contains an integer $Q$ ($1 ≤ Q ≤ 10^5$), the number of queries. Each of the next $Q$ lines contains a non-negative integer $D$ ($D < 2^{31}$).

Output

For each query, you have to print $\texttt{Query X: Y Z}$ (without the quotation marks), where $X$ is the query number starting from $1$, $Y$ is the index number of the selected integer from the array and $Z$ is the XOR result that was maximum.