------
## 最终结论
```python
from collections import Counter
import heapq

def rearange_string(s):
    if not s:
        return ""
    
    # Count the frequency of each character
    char_count = Counter(s)
    max_heap = [(-count, char) for char, count in char_count.items()]
    heapq.heapify(max_heap)
    
    result = []
    prev_char = None
    prev_count = 0
    
    while max_heap:
        count, char = heapq.heappop(max_heap)
        result.append(char)
        
        # If we had a previous character waiting to be pushed back into the heap
        if prev_count < 0:
            heapq.heappush(max_heap, (prev_count, prev_char))
        
        # Update the count of the current character and set it as previous
        prev_char = char
        prev_count = count + 1  # decrement the count since we used it
    
    rearranged_string = ''.join(result)
    
    # Check if the rearranged string is valid (no adjacent characters are the same)
    if len(rearranged_string) == len(s):
        return rearranged_string
    else:
        return ""

# Test cases
assert rearange_string("aab") == 'aba'
assert rearange_string("aabb") == 'abab'
assert rearange_string("abccdd") == 'cdabcd'
```