user
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Write an algorithm to swap the first and last characters in a string.

### Input:
hello

### Response:
assistant
Step 1: Store the first and last letters in separate variables.
Step 2: Replace the first letter with the last letter.
Step 3: Replace the last letter with the stored first letter.
Step 4: Return the final string.