895. Monu Bhaiya's Challenge

0

Hard

Monu Bhaiya wants to determine all possible results by grouping numbers and operators in a given string expression.

As a diligent student, your task is to assist him.
Print all possible values in ascending order.

Input Format

A single line containing a string expression (numbers and operators).

Output Format

Print all possible values of the given expression.

Example

Input

2-1-1

Output

0 2

Constraints

1 <= expression.length <= 20
Expression contains digits and the operators '+', '-', and '*'.
All integer values in the expression are between 0 and 99.
Loading...

View Submissions

Console