def unique_edge(dest, E):
    """Return the unique edge pointing to `dest`.

    :param dest:    destination vertex
    :type dest:     int
    :param E:       a set of edges
    :type E:        [(int, int, float), ...]
    :return:        first edge connected to vertex `dest`
    :rtype:         (int, int, float) or None
    """
    for (s, d, w) in E:
        if d == dest:
            return (s, d, w)