Polish notation is the way to write parenthesis-free expressions. Its distinguishing feature is that it places operators to the left of their operands.
expression ::= number | (operator expression expression)
operator ::= | | | | …
For example: "" is "".
You are given a Polish notation expression. Operators can be only and . Each number in expression is replaced with . You have to replace each with positive integer number, so that value of expression was . Also, you have to make the biggest number in expression as small as possible.
The only line contains string with expression (string will contain only '?', '+' and '-').
string length .
Return an integer array, number should be the number for '?' in the string. If there are many solutions print any.