Leetcode Design Hashmap Python Code For Game