From prefix to infix
In the 1920s, the Polish mathematician Jan Łukasiewicz introduced a bracket-free method for writing algebraic expressions, which became known as Polish notation in his honor. In prefix Polish notation, the operator is placed before its operands. For example, consider the infix expression (b-c/d)/(e*f-(g+h*k)). In prefix notation, the fragment "c/d" becomes "/cd", and "b-c/d" becomes "-b/cd". Similarly, "e*f" is converted to "*ef", "h*k" to "*hk", and "g+h*k" to "+g*hk". Thus, the expression "e*f-(g+h*k)" translates to "-*ef+g*hk", and when considering these prefix notations as operands for the division operation, the complete expression becomes: "/-b/cd-*ef+g*hk".
Your task is to convert a given prefix expression back into its corresponding infix expression, adhering to the following conditions:
All operands in the prefix expression must appear in the infix expression in the same order as they do in the prefix expression.
Brackets should only be used in the infix expression when necessary to preserve the intended meaning of the expression.
Input
The input consists of a single line containing the prefix expression.
The expression contains no spaces, uses lowercase Latin letters as operands, and includes only the binary operations "+", "-", "*", and "/". The length of the expression does not exceed 50. It is guaranteed that the expression is error-free.
Output
The output should be a single line containing the resulting infix expression.