The function f(x) removes the last character of the input string and adds a "{" symbol at the end.
