The function takes a string input and returns a message based on the input. The message can be either a greeting or a farewell, depending on the input.
