Python3 commented just keep a current position pointer
Runtime: 36 ms, faster than 75.00% of Python3 online submissions for RLE Iterator.\nMemory Usage: 14.6 MB, less than 45.57% of Python3 online submissions for RL
*Runtime: 36 ms, faster than 75.00% of Python3 online submissions for RLE Iterator.\nMemory Usage: 14.6 MB, less than 45.57% of Python3 online submissions for RLE Iterator.*\n\n```python\nclass RLEIterator:\n    def __init__(self, A: List[int]):\n        self.pointer = 0\n        self.nums = []\n        self.repetitions = []\n        for i in range(0, len(A) - 1, 2):\n            repetition, num = A[i], A[i + 1]\n            # avoid empty nums\n            if repetition:\n                self.nums.append(num)\n                self.repetitions.append(repetition)\n\n    def next(self, n: int) -> int:\n        # chekc if we supass\n        while n:\n            # check index out of range\n            if self.pointer == len(self.repetitions):\n                return -1\n            # move pointer\n            if n > self.repetitions[self.pointer]:\n                # reduce n\n                n -= self.repetitions[self.pointer]\n                # move pointer to next num\n                self.pointer += 1\n            else:\n                # reduce repetitions left\n                self.repetitions[self.pointer] -= n\n                n = 0\n        return self.nums[self.pointer]\n```
['Python', 'Python3']