Generate Valid Parentheses Leetcode Python Beginner Practice