create a list of indices, and a list of n, where n is the root of a square matrix. next, generate a list of appropriate maneuvers, in the case of 4: 4 3 3 2 2 1 1, because you take the first row, then the back column, then the bottom row, then the first column. The first row missing means all columns are now n-1, and after the bottom, n-2, thus, 4, 3, 3, 2, 2... Pair each number generated with an index, to expand each manuever based on the index of the number to take from a given row.
4/1
3/4
3/¯1