Order the arcs according to end_node