Turing Interview Question

They asked python mixed with permutations and combinations.