The function f(x) takes a string input and returns a string output that includes the input string and the words "Hello, world!" or "Goodbye, world!".

