The function takes a string input and appends "Hello, World!" to the beginning and "Goodbye, World!" to the end, returning the modified string.

