502. Monu Bhaiya's Puzzle

0

Hard

Given a string expression of numbers and operators, Monu Bhaiya wants to find out all possible results from computing all the different possible ways to group numbers and operators.

As a sincere student , you have to help him . Print all possible values in

As a sincere student , you have to help him . Print all possible values in

**sorted order**.Input Format

Single Line consisting of a string of Expressions (Numbers and operators) .

Output Format

Print all possible values of given expression .

Example

Input

2-1-1

Output

0 2

Constraints

1 <= expression.length <=20

Expression consists of digits and the operator '+', '-', and '*'.

All the integer values in the input expression are in the range [0, 99].

Expression consists of digits and the operator '+', '-', and '*'.

All the integer values in the input expression are in the range [0, 99].

Loading...

View Submissions

Console