perm, a list, a permutation of the list of numbers from 0 to n-1
Outputs:
a list, a doubly nested list with cycles of the permutation
Description
Every permutation has a decomposition as the concatenation of disjoint cycles. This decomposition is used to calculate the conjugacy class of the permutation.