The function rearranges the characters of the input string in alphabetical order.
