':type c: str
:rtype: List[str]'

def input(self, c):

    result = []
    if (c == '#'):
        self.__sentence_to_count[''.join(self.__search)] += 1
        self.__trie.insert(''.join(self.__search), self.__sentence_to_count[''.join(self.__search)])
        self.__cur_node = self.__trie
        self.__search = []
    else:
        self.__search.append(c)
        if self.__cur_node:
            if (c not in self.__cur_node.leaves):
                self.__cur_node = None
                return []
            self.__cur_node = self.__cur_node.leaves[c]
            result = [p[1] for p in self.__cur_node.infos]
    return result
