The domain of the function is limited to input words that are three letters long. If an input word is not three letters long, the function does not apply its rule and outputs undefined.

Please provide more input words to test the function and confirm this description.