next_permutation.py