Leetcode Nested Array Python Example Class