The function applies the rule to all inputs, except for "Bear" and "Adam" which do not follow the rule. The domain of the function is the set of all words.