Logic: 1) The rearrangement is taking place from left to right. 2) The rearrangement is taking place one word at a time. In the following arrangement, words in each step are arranged in decreasing alphabetical order. Input: Red Black Yellow Orange Pink Blue Brown Step 1: Yellow Red Black Orange Pink Blue Brown Step 2: Yellow Red Pink Black Orange Blue Brown Step 3: Yellow Red Pink Orange Black Blue Black Step 4: Yellow Red Pink Orange Brown Black Blue Step 5: Yellow Red Pink Orange Brown Blue Black Hence, “Yellow Red Pink Black Orange Blue Brown " is the 2nd step of the given input.