Instructions: A word and number arrangement machine when given an input line of words and numbers rearrange
them following a particular rule in each step. The following is an illustration of input and rearrangement.
Input: Bataan 26 16 earldom 31 desirous pastry 83
Step 1 : pastry Bataan 26 16 earldom 31 desirous 83
Step 2 : pastry 16 Bataan 26 earldom 31 desirous 83
Step 3 : pastry 16 earldom Bataan 26 31 desirous 83
Step 4 : pastry 16 earldom 26 Bataan 31 desirous 83
Step 5 : pastry 16 earldom 26 desirous 31 Bataan 83
As per the rule followed in the following questions the appropriate step for the given input.
Input : quetch buttony 11 95 65 astringe debauchee 31
How many steps will be required to complete the re-arrangement?
IV
V
VI
VIII
VII
Input : Q B 11 95 65 A D 31
Step I : Q 11 B 95 65 A D 31
Step II : Q 11 D B 95 65 A 31
Step III : Q 11 D 31 B 95 65 A
Step IV : Q 11 D 31 B 65 95 A
Step V : Q 11 D 31 B 65 A 95