Given a task, you should write a program that solves the task using the instructions below. Let x_t denote the result of the t-th instruction. The permitted instructions, the syntax, and the result x_t are given below:
| Name | Operator | Parameters | Effects |
|---|---|---|---|
| Input | I | N/A | Read a real number from the terminal and make the number x_t |
| Output | O | i | Print x_i to the terminal, and x_t=x_i |
| Addition | + | ij | x_t=x_i+x_j |
| Adding constant | C | ic | x_t=x_i+c |
| Negate | - | i | x_t=−x_i |
| Left shift | < | ik | x_t=x_i⋅2k |
| Right shift | > | ik | x_t=x_i⋅2−k |
| S | S | i | x_t=s(x_i) |
| Comparison | P | ij | x\_t = \left\\{ \begin{array}{ll} -1 & \quad x\_i < x\_j \\\ 0 & \quad x\_i = x\_j \\\ 1 & \quad x\_i > x\_j \end{array} \right. |
| Max | M | ij | x\_t = \left\\{ \begin{array}{ll} x\_i & \quad x\_i > x\_j \\\ x\_j & \quad x\_i \leq x\_j \\\ \end{array} \right. |
| Multiplication | * | ij | x_i=x_i⋅x_j |
Here, the definition of s(x) is given below where e=2.718281828459045… is the base of natural logarithm:
s(x)=1+e−x1.
Notice there is a penalty for using the P, M, and * operators. See details below in the "grading" section.
For each instruction, the parameters i and j must be smaller than the current instruction number t. The instructions are executed in the order, one by one.
The operations have finite precision: in particular, the results are only accurate up to 90 digits after the decimal point and the rest will be rounded. Similarly, the argument c to the adding constant instruction can have at most 90 digits in its decimal part.
For left shift and right shift instructions, k must be a non-negative integer not exceeding 10000.
The ten tasks are given below:
The i-th line describes the i-th instruction: first, you should output a letter denoting the operation. Then output several (or zero) integers denoting the parameters to the operation. The operator and the parameters (and between parameters) should be separated by a single space.
You can output at most 104 lines.