The function f(x) applies a rule to input words, but only for input words that are three letters long. For input words that are not three letters long, the function outputs undefined.

