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


def swap_all(text: str) -> str:
    result = ""
    i = 0
    while i < len(text):
        if i + 1 < len(text):
            result += text[i + 1] + text[i]
            i += 2
        else:
            result += text[i]
            i += 1
    
    return result
```