Pergunta de entrevista da empresa PayPal

Print all the possible combinations of a string?