from typing import Iterable
from typing import List


def unique_prefixes(
    strings: Iterable,
    prefix_lengths: List[int]
) -> List[List[str]]:
    """ find unique prefixes in Iterable, for each length in `prefix_lengths`
    
    Arguments:
        strings {Iterable} -- iterable to search over
        prefix_lengths {List[int]} -- list of lengths of prefixes
    
    Returns:
        List[List[str]] -- list of lists of unique prefixes (one for each length in
            prefix_lengths)
    """

    prefixes = [
        list(set([string[:prefix_length] for string in strings]))
        for prefix_length in prefix_lengths
    ]
    [prefix_list.sort() for prefix_list in prefixes]
    return prefixes