itertools permutations()

welcome to shbcf.ru