def make_edge(u, v):
    """
    Create a tuple representing an undirected edge.

    @param u, v endpoints of the edge

    @return a tuple (u, v) representing the edge. It is guaranteed that u <= v.
    """

    if u > v:
        u, v = v, u
    return (u, v)