def construct_path(u,v,discovered):
    """Use the discovered dictionary from 
    depth-first search to reconstruct 
    a path from node u to node v.
    """
    path = []
    # Deal with empty case
    if v not in discovered:
        return path
    
    # build list of edges 
    # that connect v to u,
    # then reverse it.
    path.append(v)
    walk = v
    while walk is not u:
        e = discovered[walk]
        parent = e.opposite(walk)
        path.append(parent)
        walk = parent
    path.reverse()
    return path