Pregunta de entrevista de Turing

They asked python mixed with permutations and combinations.