The function f(x) assigns a numerical value to each character in the input string.
