def construct_path(relation, start, end):
    """ 
    Constructs a path between two actors using a dictionary of child-parent 
    relationships. Returns a list with actor IDs.
    """ 
    
    path = [start]
    while end != start:
        path.append(relation[start])
        start = relation[start]
    path.reverse()
    return path