Leetcode Design Hashmap Python Code For Snake