The function takes a string input and returns a greeting or farewell message based on the input.

