Permutation and combination of a string