def unicyclic(n, index=0): sigma = Permutation([], size=(2**n) - 1) sigma = sigma + index return Permutation(list(Permutation([sigma.list(2**n)])))