Alphabetically first word (starting with consonant) is moved to the leftmost position and alphabetically first word (starting with vowel) is moved to the rightmost position.
In next step alphabetically 2nd words are operated in the same manner and so on.
In the 6th step, words starting with vowels are arranged in opposite sequence. Similarly, words starting with consonant also arranged in opposite sequence.
Applying the same logic to the given line of input, we get: -
Input: Paint Dent Asteroid Near Flex Ellipse Interest Glimpse Optimal Urban
Step-1: Dent Paint Near Flex Ellipse Interest Glimpse Optimal Urban Asteroid
Step-2: Flex Dent Paint Near Interest Glimpse Optimal Urban Asteroid Ellipse
Step-3: Glimpse Flex Dent Paint Near Optimal Urban Asteroid Ellipse Interest
Step-4: Near Glimpse Flex Dent Paint Urban Asteroid Ellipse Interest Optimal
Step-5: Paint Near Glimpse Flex Dent Asteroid Ellipse Interest Optimal Urban
Step-6: Dent Flex Glimpse Near Paint Urban Optimal Interest Ellipse Asteroid
This is the final step.
Step-5: Paint Near Glimpse Flex Dent Asteroid Ellipse Interest Optimal Urban