Reverses a string and prints the result.