Simple Python solution
```\nclass Solution:\n    def init(self, m: int, n: int):\n        self.m = m\n        self.end = m*n-1\n        self.visited = set()\n\n    def flip(self) -> L
```\nclass Solution:\n    def __init__(self, m: int, n: int):\n        self.m = m\n        self.end = m*n-1\n        self.visited = set()\n\n    def flip(self) -> List[int]:\n        k = random.randint(0, self.end)\n        while(k in self.visited):\n            k = random.randint(0, self.end)\n        self.visited.add(k)\n        return [k%self.m, k//self.m]\n\n    def reset(self) -> None:\n        self.visited = set()
[]