hackerrank string permutation