Shift 2D Grid - Leetcode 1260 - Python