script for generation permutation groups