Python solution easy and straight forward
\nclass OrderedStream:\n    def __init__(self, n: int):\n        self.stream = [None]*(n+1)\n        self.temp = 1\n\n    def insert(self, id: int, value: str) 
```\nclass OrderedStream:\n    def __init__(self, n: int):\n        self.stream = [None]*(n+1)\n        self.temp = 1\n\n    def insert(self, id: int, value: str) -> List[str]:\n        self.stream[id] = value\n        ans = []\n        while self.temp < len(self.stream) and self.stream[self.temp]:\n            ans.append(self.stream[self.temp])\n            self.temp += 1\n        return ans\n```
['Python', 'Python3']