Leetcode 399 Python Example Classical Conditioning