The function appends the last character of the input string to the original string.

