Generate Valid Parentheses Leetcode Python Easy Chess