Leko says to YSITD
itertools.permutations