def isAlienSorted(self, words: List[str], order: str) -> bool:
    if (len(words) <= 1):
        return True
    self.dic = {}
    for (i, char) in enumerate(order):
        self.dic[char] = i
    for i in range(1, len(words)):
        if (self.cmp(words[i], words[(i - 1)]) == (- 1)):
            return False
    return True
def isAlienSorted(self, words: List[str], order: str) -> bool:
    if (len(words) <= 1):
        return True
    self.dic = {}
    for (i, char) in enumerate(order):
        self.dic[char] = i
    for i in range(1, len(words)):
        if (self.cmp(words[i], words[(i - 1)]) == (- 1)):
            return False
    return True