The function takes a string input and returns a greeting or farewell message, depending on the input. It also accepts multiple inputs and returns a concatenation of the greetings.

