Python implementation of permutations and permutation groups based on dictionaries.