SP19301 BLOPER2 - Operators (new ver)

Description

Given a sequence a1, a2,..., an and a integer S, your task is find a way to insert an operator ‘+’ , ‘-‘, ‘.‘, ‘~‘ to every neighbor pair of A, that the result of the expression after insert equal to S. **Note that :** - a . b = a + 2 \* b - a ~ b = a - 2 \* b

Input Format

First line : N and S (2 Second line : N integers, a1, a2,..., an (|ai|

Output Format

If there are way(s) to insert, output any of them, otherwise output “Impossible” (without quotes).