```python
def swap_pair(first: str, second: str) -> str:
    if len(first) != 1 or len(second) != 1:
        raise ValueError("Both inputs must be single characters.")
    return second + first


def swap_all(text: str) -> str:
    if not text:
        return ""
    
    # Swap pairs and leave the last character unchanged if the length is odd
    return "".join(swap_pair(text[i], text[i+1]) for i in range(0, len(text)-1, 2)) + text[-1]
```