Just like all math-loving students, Bobo loves squares, especially big ones, and he loves to combine many small squares into a big one. “Exactly. That's why I drew squares on my algebra exam,” Bobo explained to his algebra professor.
Because of this, Bobo is also interested in perfect squared squares, which are squares that can be dissected into smaller squares of different sizes. The smallest order for a perfect squared square is 21, discovered by A. J. W. Duijvestijn.
However, it's too difficult for Bobo to assemble squares of different sizes into a big square, so he wants to start with something simpler, like assembling n×nn\times nn×n small squares with side length 1 into a big square with side length nnn. Of course, Bobo cannot use only one operation to assemble all the squares together, or it would be too boring. He now has a new requirement: the number of squares merged each time must be between 2 and 50 (inclusive), and the resulting shape must still be a square.
Bobo doesn't know how to proceed, so he has given this problem to you. It is guaranteed that under the constraint of this problem, a valid sequence of operations always exists.