In the third phase of the experiment a male was placed in the cage over the box where the female had once been, and the amount of aggression towards this male from the nesting male was measured.
For each box sequence in the input file, output the length of the longest nesting string on one line followed on the next line by a list of the boxes that comprise this string in order.