String permutation (stored instead of printing).