Modified GenerateParenthesis