Generate Valid Parentheses Leetcode Python Problems