2) Whichever group gets moved down gets moved into the one which is closest to being full if that is possible, otherwise it moves into the one which is farther from being full. (You can prove that the smaller of H and T can always move into the one which is farthest from being full.) If there is a tie then you move it into A.