Exercise: Permutations


Write a program to print all permutations of a given string

For "ABC", it should print the following series: ABC ACB BAC BCA CBA CAB