The cycles2permu command does the opposite of perm2cycles; it turns a sequence of cycles into a permutation.