def set_item(container, indeces, value):
    """Set item in recursive list."""
    while len(indeces) > 1:
        container = container[indeces[0]]
        indeces = indeces[1:]
    container[indeces[0]] = value
