406188: GYM102307 B Boring Non-Palindrome

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Boring Non-Palindrometime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

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?

Input

Input consists of a single line with a non-empty string without spaces.

The length of the string is at most $$$5000$$$.

Output

Print one single line with the string after the changes of Mr. Potato Head.

ExamplesInput
helloworld
Output
helloworldlrowolleh
Input
anitalavalatina
Output
anitalavalatina
Note

A palindrome is a string that reads the same backwards as forwards

加入题单

算法标签: