add permutation sequence python version