Python 93% fast solution - 5 lines only
\nclass OrderedStream:\n\n    def __init__(self, n: int):\n        self.li=[0]*(n+1)\n        self.ptr=0\n\n    def insert(self, idKey: int, value: str) -> List
```\nclass OrderedStream:\n\n    def __init__(self, n: int):\n        self.li=[0]*(n+1)\n        self.ptr=0\n\n    def insert(self, idKey: int, value: str) -> List[str]:\n        self.li[idKey-1]=value\n        end=self.li.index(0)\n        k=self.ptr\n        self.ptr=end\n        return self.li[k:end]\n        \n\n\n# Your OrderedStream object will be instantiated and called as such:\n# obj = OrderedStream(n)\n# param_1 = obj.insert(idKey,value)\n```
['Python', 'Python3']