fastest solution possible in python
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:n\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:1\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass RLEIterator:\n\n    def __init__(self, encoding: List[int]):\n        self.lst=encoding\n\n    def next(self, n: int) -> int:\n        num=-1\n        while self.lst and n>0:\n            if n<=self.lst[0]:\n                self.lst[0]-=n  \n                n=0\n                num=self.lst[1]\n            else:\n                n-=self.lst[0]\n                self.lst[0]=0\n            if self.lst[0]==0:\n                self.lst.pop(0)\n                self.lst.pop(0)\n        if n>0:\n            return -1\n        return num\n```
['Python3']