The function `f(x)` capitalizes the first letter of the input string and converts the remaining letters to lowercase. If the input string consists only of digits, the function leaves it unchanged.

