The function reverses the input word.
