print all permutations of a given string(duplicate characters.)