406188: GYM102307 B Boring Non-Palindrome
Description
Holidays are almost over and our dear friend Mr. Potato Head wants to enjoy his last days of vacations with different fun activities like solving equations, calculating areas of figures, among others.
Currently, he is playing with different strings, although he finds that most of strings are boring non-palindromic strings. That is why Mr. Potato Head will transform any string into a palindrome inserting characters at the end of the corresponding string.
However, Mr. Potato Head does not want to spend his lasts days of holidays only inserting characters in strings, so he will insert the minimum possible of characters to convert the boring non-palindromic string into a fun palindromic one.
Can you guess the fun strings Mr. Potato Head created from boring ones?
InputInput consists of a single line with a non-empty string without spaces.
The length of the string is at most $$$5000$$$.
OutputPrint one single line with the string after the changes of Mr. Potato Head.
ExamplesInputhelloworldOutput
helloworldlrowollehInput
anitalavalatinaOutput
anitalavalatinaNote
A palindrome is a string that reads the same backwards as forwards