Pergunta de entrevista da empresa Goldman Sachs

How would you print all possible permutations for the first n(input) natural numbers