Recently, mathematicians from Cuckooland have invented a new binary operation "asterisk," which uses sequences as its arguments. The operation simply appends the first sequence to the end of the second. For example, (2, 4) * (1, 3) = (1, 3, 2, 4). Asterisk operations in one expression are performed from left to right, but this order can be changed using parentheses (operations in parentheses are performed earlier). For example, (3) * ((1, 5) * (2, 7)) = (2, 7, 1, 5, 3).
Notice that if a sequence element is an expression, the expression is evaluated first, and then all nested parentheses in this sequence are removed. For example, (1, ((2) * (3)), 4) = (1, (3, 2), 4) = (1, 3, 2, 4).
Now, Cuckoolanders want to use this operation to generate permutations. More precisely, they want to obtain a given permutation from the permutation (1, 2, ..., N) by adding parentheses, commas, and asterisks and evaluating the resulting expression.
The formal definition of an expression is as follows:
<expression> ::= <sequence> [* <sequence> ...]
<sequence> ::= ( <sequence element> [, <sequence element> ...] )
<sequence element> ::= <number> | <expression>
<number> ::= 1 | 2 | ...| N
The first line contains an integer (1 \leq N \leq 10000). The second line contains a permutation of numbers from to . The numbers are separated by spaces.
Output a single line with a correct expression that evaluates to the given permutation. Numbers from to should appear in ascending order. The length of the expression must not exceed characters. If there is no such expression, output IMPOSSIBLE. Note that the expression must not contain spaces, and all sequences must be enclosed in parentheses.
Example 1