I have a number of Tiles resembling a Sphere.

In each tile, the Vertices are arranged in a different order, I want to rearrange them in a uniform order, like this,

So, the way I've been doing this is,
- Select the first row of Vertices, Apply 'Sort Elements' - 'Selected'
- Select the first two rows of Vertices, Apply again
- Select the first three rows of Vertices, and so on...
But there are around 600 tiles, and doing each of them like this manually would be exhausting. I think Scripting would be ideal for this, But I don't know How to get the rows of Vertices, especially since I don't know the exact indexes of the Vertices that are in the first row. Can anyone point me in the right direction?