Python3 Solution
\n\nclass Solution:\n    def smallestSufficientTeam(self, req_skills: List[str], people: List[List[str]]) -> List[int]:\n        m=len(req_skills)\n        n=le
\n```\nclass Solution:\n    def smallestSufficientTeam(self, req_skills: List[str], people: List[List[str]]) -> List[int]:\n        m=len(req_skills)\n        n=len(people)\n        skill_index={v:i for i,v in enumerate(req_skills)}\n        cand=[]\n        for skills in people:\n            val=0\n            for skill in skills:\n                val |=1<<skill_index[skill]\n\n            cand.append(val)\n\n        @cache\n        def fn(i,mask):\n            if mask==0:\n                return []\n\n            if i==n:\n                return [0]*100\n\n            if not (mask & cand[i]):\n                return fn(i+1,mask)\n\n            return min(fn(i+1,mask),[i]+fn(i+1,mask &~cand[i]),key=len)\n\n        return fn(0,(1<<m)-1)                        \n```
['Python', 'Python3']