<gh_stars>0
class Solution:
    def shortestCompletingWord(self, licensePlate: str, words: List[str]) -> str:
        di = defaultdict(int)
        for s in licensePlate:
            if s.isalpha():
                di[s.lower()] += 1
        word_di = defaultdict(int)
        length = 16
        ans = ''
        for string in words:
            word_di.clear()
            for s in string:
                word_di[s] += 1
            isPlate = True
            for key in di.keys():
                if di[key] > word_di[key]:
                    isPlate = False
            if isPlate and length > len(string):
                length = len(string)
                ans = string
        return ans
