The function f(x) takes a string input and returns a simple greeting or farewell message based on the input.

