ONP  Transform the Expression
Transform the algebraic expression with brackets into RPN form (Reverse Polish Notation). Twoargument operators: +, , *, /, ^ (priority from the lowest to the highest), brackets ( ). Operands: only letters: a,b,...,z. Assume that there is only one RPN form (no expressions like a*b*c).
Input
t [the number of expressions <= 100] expression [length <= 400] [other expressions]
Text grouped in [ ] does not appear in the input file.
Output
The expressions in RPN form, one per line.
Example
Input: 3 (a+(b*c)) ((a+b)*(z+x)) ((a+t)*((b+(a+c))^(c+d))) Output: abc*+ ab+zx+* at+bac++cd+^*
hide comments
Simes:
20220113 14:24:00
@lazorzor. There are multiple test cases. You need to read the number of testcases, and process each one.


lazorzor:
20220113 12:30:08
PLEASE any help will be immensely appreciated. Please look at the code below.


ophysto:
20220101 05:10:39
If you are really stuck search in google "shuting yard algorithm" there are an implementation in pseudocode. 

iamrick:
20211231 17:08:03
idea: Transform to postfix expression


a_cool_name:
20211116 15:34:40
Learnt the concept of stack through this question. 

avinshsingh:
20211029 06:57:38
easy to solve 

sunny77:
20210821 11:04:16
Browse wikipedia for RPN. You'll get an idea! 

vikasss_7663:
20210729 16:06:40
using stack 

botter_code:
20210602 12:20:49
lessgoo 

kpjoshi:
20210523 21:47:19
The problem statement grossly overstates how complex the input can be. I did not have to account for operator precedence at all, and I could assume every 2 operand subexpression would have brackets around it! 
Added by:  mima 
Date:  20040501 
Time limit:  5s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: NODEJS PERL6 VB.NET 
Resource:   