The function f(x) applies a suffix to the input word to form the output. The suffixes used are "-animal", "-city", "-lunar", and "-person". However, the function only applies this rule for certain inputs, and not for all of them.

