You are given a boolean function of three variables which is defined by its truth table. You need to find an expression of minimum length that equals to this function. The expression may consist of:
* Operation _AND_ ('_&_', ASCII code 38)
* Operation _OR_ ('_|_', ASCII code 124)
* Operation _NOT_ ('_!_', ASCII code 33)
* Variables _x_, _y_ and _z_ (ASCII codes 120-122)
* Parentheses ('_(_', ASCII code 40, and '_)_', ASCII code 41)
If more than one expression of minimum length exists, you should find the lexicographically smallest one.
Operations have standard priority. _NOT_ has the highest priority, then _AND_ goes, and _OR_ has the lowest priority. The expression should satisfy the following grammar:
E ::= E '_|_' T | T
T ::= T '_&_' F | F
F ::= '_!_' F | '_(_' E '_)_' | '_x_' | '_y_' | '_z_'
## Input
The first line contains one integer _n_ — the number of functions in the input (1 ≤ _n_ ≤ 10 000).
The following _n_ lines contain descriptions of functions, the _i_\-th of them contains a string of length 8 that consists of digits _0_ and _1_ — the truth table of the _i_\-th function. The digit on position _j_ (0 ≤ _j_ < 8) equals to the value of the function in case of , and .
## Output
You should output _n_ lines, the _i_\-th line should contain the expression of minimum length which equals to the _i_\-th function. If there is more than one such expression, output the lexicographically smallest of them. Expressions should satisfy the given grammar and shouldn't contain white spaces.
[samples]
## Note
The truth table for the second function:

Definitions:
- Let $ f: \{0,1\}^3 \to \{0,1\} $ be a Boolean function of three variables $ x, y, z $.
- The truth table of $ f $ is given as a binary string $ s \in \{0,1\}^8 $, where $ s[j] = f(x,y,z) $ for $ j = 4a + 2b + c $, with $ a,b,c \in \{0,1\} $ corresponding to $ x,y,z $ respectively in lexicographic order:
$$
(x,y,z) = (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1)
$$
Grammar:
$$
\begin{align*}
E &::= E \mid T \mid T \\
T &::= T \land F \mid F \\
F &::= \neg F \mid (E) \mid x \mid y \mid z
\end{align*}
$$
(Note: `_||_` → $ \mid $, `_&_` → $ \land $, `_!_` → $ \neg $, no whitespace.)
Constraints:
- Expression must be syntactically valid under the above grammar.
- Operator precedence: $ \neg $ (highest), $ \land $, $ \mid $ (lowest).
- Parentheses may be used only where necessary to override precedence.
Objective:
For each given truth table $ s $, find an expression $ \mathcal{E} $ such that:
1. $ \mathcal{E} $ computes $ f $ (i.e., matches truth table $ s $).
2. The length of $ \mathcal{E} $ (number of characters) is minimized.
3. Among all minimal-length expressions, choose the lexicographically smallest one under the ordering:
$ \neg < ( < ) < x < y < z < \land < \mid $
(i.e., character order: `!` < `(` < `)` < `x` < `y` < `z` < `&` < `|`)
Input:
- Integer $ n $ ($ 1 \leq n \leq 10{,}000 $)
- $ n $ binary strings of length 8, each representing a truth table.
Output:
- $ n $ lines, each containing the minimal-length, lexicographically smallest expression for the corresponding function.