Infix to postfix and Singleton