The rule applied by the function f(x) is that it swaps the first letter of the input word with the first letter of the output word.
