python hashmap
\nclass Node:\n    def __init__(self):\n        self.idxs = set()\n        self.minimal = float("inf")\n\nclass NumberContainers:\n\n    def __init__(self):\n  
```\nclass Node:\n    def __init__(self):\n        self.idxs = set()\n        self.minimal = float("inf")\n\nclass NumberContainers:\n\n    def __init__(self):\n        self.number2index = defaultdict(Node)\n        self.index2number = dict()\n\n        \n    def change(self, index: int, number: int) -> None:\n        if index in self.index2number:\n            value = self.index2number[index]\n            self.number2index[value].idxs.remove(index)\n            if len(self.number2index[value].idxs) == 0:\n                del self.number2index[value]\n            elif self.number2index[value].minimal == index:\n                self.number2index[value].minimal = min(self.number2index[value].idxs)\n        self.number2index[number].idxs.add(index)\n        self.number2index[number].minimal = min(self.number2index[number].minimal, index)\n        self.index2number[index] = number\n            \n\n    def find(self, number: int) -> int:\n        return self.number2index[number].minimal if self.number2index[number].minimal != float("inf") else -1\n\n```
['Python', 'Python3']