A word and number arrangement machine rearranges an input line step by step, following a rule. Here is an illustration of the input and the steps:
Input: lamp 17 68 wall 92 umbrella fish 39
Step I: 92 lamp 17 68 wall umbrella fish 39
Step II: 92 68 lamp 17 wall umbrella fish 39
Step III: 92 68 39 lamp 17 wall umbrella fish
Step IV: 92 68 39 17 lamp wall umbrella fish
Following the same rule, the machine is given this input: desk eagle 32 ship 36 68 67 fish
What is the final arrangement (the last step)?
Rule (from the illustration): In each step the largest number not yet arranged moves to the left end, after the numbers already arranged; the words keep their order.
For the new input: Step I: 68 desk eagle 32 ship 36 67 fish; Step II: 68 67 desk eagle 32 ship 36 fish; Step III: 68 67 36 desk eagle 32 ship fish; Step IV: 68 67 36 32 desk eagle ship fish.
Answer: 68 67 36 32 desk eagle ship fish