Shortest Common Subsequence Leetcode Python