f(x) applies a simple substitution cipher to the input word, where each letter in the word is replaced by a corresponding letter in the predetermined word "Bear". The function ignores any spaces or punctuation in the input word.

