10599 - Postfix to Prefix Problem   

Description

Please convert a postfix expression to prefix expression.

Each test case contains only one postfix expression.

Input

Each input is a postfix expression.

We use only uppercase English alphabets as the name of variables in the expression,

and use only '+', '-', '*', '/' as possible operators.

The following are examples for our postfix expression:

AB+

AB/CD*+

Output

Each output is a prefix expression with respect to previous postfix expression

For example, if the postfix expression is AB+, the according prefix expression is +AB

Note that each output should not append a newline character.

Sample Input  Download

Sample Output  Download

Tags




Discuss