Push Dominoes - Leetcode 838 - Python