python 3 || simple solution
```\nclass OrderedStream:\n\n    def init(self, n: int):\n        self.stream = [\'\'] * (n + 1)\n        self.i = 0\n\n    def insert(self, idKey: int, value: 
```\nclass OrderedStream:\n\n    def __init__(self, n: int):\n        self.stream = [\'\'] * (n + 1)\n        self.i = 0\n\n    def insert(self, idKey: int, value: str) -> List[str]:\n        self.stream[idKey - 1] = value\n        res = []\n\n        while self.stream[self.i]:\n            res.append(self.stream[self.i])\n            self.i += 1\n        \n        return res
['Array', 'Python', 'Python3']