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
chandansirola:
20160418 16:52:15
done (y) Last edit: 20160418 16:55:21 

jkaszycki:
20160416 21:18:21
Reverse Polish Notation is such:


happy:
20160409 08:18:26
at last....feeling relaxed


nischaymalhan:
20160322 22:39:45
Didn't leave a line after printing output for different test cases... Got stuck for more than an hour... Tragedy of Coding xD 

pica_power:
20160309 17:29:33
Got AC in first attemept.. :)


last_mohican:
20160307 22:39:58
Wrong answer?! How can I see where? 

geekahmed:
20160305 17:39:07
it gives me segmentation fault , but when I run it on my pc


shyam55555:
20160202 11:57:58
Succeed.. But seems like i took long time.. almost 3 hours.. Is this a problem with me only? :) 

imshubhamk:
20160126 17:57:41
got ac in first attempt.....


rajanbitp:
20160121 14:08:24
hurrah, got AC in first Attempt. 
Added by:  Michał Małafiejski 
Date:  20040501 
Time limit:  5s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: NODEJS PERL 6 VB.net 
Resource:   