Write a program that, given different words , prints all the permutations that can be made up with the words.
Input consists of a number , followed by .
Print all the permutations that can be made up with .
You can print the solutions to this exercise in any order.
Input
3 hola adeu hi
Output
(hola,adeu,hi) (hola,hi,adeu) (adeu,hola,hi) (adeu,hi,hola) (hi,hola,adeu) (hi,adeu,hola)