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: kite gate 24 pot 90 rain 82 93
Step I: gate 93 kite 24 pot 90 rain 82
Step II: gate 93 kite 90 24 pot rain 82
Step III: gate 93 kite 90 pot 82 24 rain
Step IV: gate 93 kite 90 pot 82 rain 24
Following the same rule, the machine is given this input: 86 rose 52 sun 82 gate 76 hill
In Step II, which element is 2nd from the left end?
Rule (from the illustration): In each step the word that comes first in the dictionary moves to the left end, followed by the largest number, after the pairs already arranged.
For the new input: Step I: gate 86 rose 52 sun 82 76 hill; Step II: gate 86 hill 82 rose 52 sun 76; Step III: gate 86 hill 82 rose 76 52 sun; Step IV: gate 86 hill 82 rose 76 sun 52.
Answer: 86