The cycles2permu command is the inverse of perm2cycles; it turns a sequence of cycles into a permutation.
Examples.