def transliterate(trans, item):
    """Transliterates string, list of strings and list of list of strings"""
    if isinstance(item, str):
        return trans.get(item, item)
    if isinstance(item, list) and len(item) > 0:
        if isinstance(item[0], str):
            return [trans.get(i, i) for i in item]
        if isinstance(item[0], list):
            return [[trans.get(i, i) for i in first] for first in item]
    return item