The function takes a string input and outputs a pre-defined greeting or farewell message based on the input.

