The function takes a string input and returns a modified version of the string with the words "hello, world!" or "goodbye, world!" inserted at the beginning and end, depending on the input.

