Paltech interview question

Rearrange the string so that any two adjacent characters are not the same.