add balanced parentheses by using Python Stack