Python Permutations Class