Generate All Valid Parentheses Leetcode Python