The function takes a string input and returns it with a greeting or farewell message added.

