Optimized Python backtracking solution (very fast)
\nclass Solution:\n    def smallestSufficientTeam(self, req_skills: List[str], people: List[List[str]]) -> List[int]:\n        \n        res = [\'\'] * 17\n    
```\nclass Solution:\n    def smallestSufficientTeam(self, req_skills: List[str], people: List[List[str]]) -> List[int]:\n        \n        res = [\'\'] * 17\n        n = len(req_skills)\n        def dfs(idx, has, path):\n            nonlocal res\n            if idx == n:\n                res = path\n            elif req_skills[idx] in has:\n                dfs(idx + 1, has, path)\n            else:\n                if len(path) + 1 < len(res):\n                    for i, p in enumerate(people):\n                        p = set(p)\n                        if req_skills[idx] in p:\n                            union = p & has\n                            has |= p\n                            dfs(idx + 1, has, path + [i])\n                            has -= p\n                            has |= union\n        dfs(0, set(), [])\n        return res\n\t\t```
['Backtracking', 'Python3']