```python
def swap_pair(first: str, second: str) -> str:
    return second + first


def swap_all(text: str) -> str:
    result = []
    for i in range(0, len(text), 2):
        if i + 1 < len(text):
            result.extend([text[i], text[i + 1]])
        else:
            result.append(text[i])
    return ''.join(result)
```