Python3 Solution
Hard mode: take a shot every time you have to type self.\npython\nclass OrderedStream:\n    \n    def __init__(self, n: int):\n        self.S = [None]*(n+1)\n  
Hard mode: take a shot every time you have to type `self`.\n```python\nclass OrderedStream:\n    \n    def __init__(self, n: int):\n        self.S = [None]*(n+1)\n        self.i = 1\n        \n    def insert(self, id: int, value: str) -> List[str]:\n        self.S[id] = value\n        while self.i < len(self.S):\n            if not self.S[self.i]:\n                break\n            self.i += 1\n        return self.S[id:self.i]\n```
['Python', 'Python3']