Set Position of Endpoint End to Endpoint Start?

GN … Is there a way to Set Position of Endpoint End to Endpoint Start for multiple Curves in single Geometry?

Screenshot 2024-06-20 233309

What I did was “Sample Index” of itself and offset by adding 1 with “Endpoint selection” of the Curves.