Finding shortest generators of permutations (using (2 1 3 ... n) and (2 3 ... n 1)).