You are tasked with a straightforward problem involving bitwise operations. Given a number and a specified operation type, you need to compute the resulting value as follows:


...

, if the operation is bitwise AND, denoted by "".


...

, if the operation is bitwise OR, denoted by "".
The input consists of multiple test cases. The first line contains the integer , representing the number of test cases, where 1 \leq T \leq 10^4. Each of the following lines contains two values: the type of operation (OR or AND) and the number , where 1 \leq N \leq 10^{100}.
For each test case, output the result on a new line.
Example 1