Rotate the waypoint numbers

I have a 50-wp flight. I’ve decided to change my home point to a more distant location, near point 11.

I want to change the numbering and make some adjustments at the ends.

So point 11 becomes 1, 12 becomes 2, 13 becomes 3… and 10 becomes 50.

The catch is that the new 50 becomes the last point (end of the flight) and the old 50 is followed by the old 1.

Any ideas on how to do this?

I’ve thought about the CSV table, but I don’t see how to get it.

Thanks