python iterative solution using stack
\nclass CombinationIterator:\n\n    def __init__(self, s: str, n: int):\n        self.s = s\n        self.n = n\n        self.st = []\n        for i in reversed
```\nclass CombinationIterator:\n\n    def __init__(self, s: str, n: int):\n        self.s = s\n        self.n = n\n        self.st = []\n        for i in reversed(range(len(s))):\n            self.st.append((s[i], i+1))\n            \n    def next(self) -> str:\n        while self.st:\n            el, idx = self.st.pop()\n            if len(el)==self.n:\n                return el\n            for i in reversed(range(idx, len(self.s))):\n                self.st.append((el+self.s[i], i+1))\n        \n    def hasNext(self) -> bool:\n        while self.st and self.n-len(self.st[-1][0])+self.st[-1][1]>len(self.s):\n            self.st.pop()\n            \n        return len(self.st)!=0\n```
['Stack', 'Iterator', 'Python']