Sponsored
Use these hints if you're stuck. Try solving on your own first.
Sort the string.
Check if there are equivalent characters in the middle, if there are, shift the ones from the right side more to the right until they don't overlap.
Solve with full IDE support and test cases