Simple fast solution
Code
# Code
```golang []
type group struct {
	s        []int
	isSorted bool
}

type NumberContainers struct {
	index map[int]int
	group map[int]group
}

func Constructor() NumberContainers {
	return NumberContainers{
		index: make(map[int]int),
		group: make(map[int]group),
	}
}

func (nc *NumberContainers) Change(index int, number int) {
	if prev, exists := nc.index[index]; exists {
		if prev != number {
			nc.remove(index, prev)
			nc.add(index, number)
		}
	} else {
		nc.add(index, number)
	}
}

func (nc *NumberContainers) add(index, number int) {
	nc.index[index] = number
	nc.group[number] = group{
		s: append(nc.group[number].s, index),
		isSorted: false,
	}
}

func (nc *NumberContainers) remove(index, prev int) {
	g := nc.group[prev]
	for i, val := range g.s {
		if val == index {
			g.s = append(g.s[:i], g.s[i+1:]...)
            nc.group[prev] = g
			break
		}
	}
	delete(nc.index, index)
}

func (nc *NumberContainers) Find(number int) int {
	g, exists := nc.group[number]
	if !exists || len(g.s) == 0 {
		return -1
	}

	if !g.isSorted {
		sort.Ints(g.s)
		g.isSorted = true
	}

    nc.group[number] = g

	return g.s[0]
}

```
['Go']