perm2.py first version