Converting a Reverse Polish notation to Prefix & Infix notation and calculate the result