finished printing permutations of a string