Bit Operations

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

You are given NN pairs of integers (x_i,y_i)(x\_i, y\_i). Construct a function ff that satisfies y_i=f(x_i)y\_i = f(x\_i) for each ii. It must be possible to write the function ff in the C programming language in the following form:

uint32_t f(uint32_t x) {
  return Expression;
}

Here, uint32_t is an unsigned 32-bit integer. The Expression must satisfy the following BNF:

<expr> ::= "x"
         | <num>
         | "(~" <expr> ")"
         | "(" <expr> <op2> <expr> ")"
<op2> ::= "&" | "|" | "^" | "+" | "-" | "*"

Here, <num> is an unsigned 32-bit integer represented as a decimal number. It must not contain leading zeroes, except if it is zero itself which must be represented as 00.

입력

The first line contains an integer NN (1N81 \le N \le 8).

The ii-th of the next NN lines contains two integers x_ix\_i and y_iy\_i (0x_i,y_i<2560 \le x\_i, y\_i < 256).

출력

Print an expression that satisfies the conditions.

The output must strictly follow the BNF format in the statement. Extra whitespaces, newlines, parentheses, etc.~are not allowed. The output must contain at most 10510^5 characters. It is guaranteed that the answer exists for the given input.