Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/palindrom-yasash

Build a palindrome

Easy 1000 ms 64 MB 16%
Share

A three-digit positive integer $n$ is given. Append its first two digits in reverse order to its end to get a five-digit number: $123$ gives $12321$. Such a number reads the same from left to right and from right to left (a palindrome).

The digits of a three-digit number; the second and the first digits are appended, forming a five-digit palindrome

Input

One three-digit positive integer $n$.

Output

One five-digit positive integer.

Note

$100 \le n \le 999$

Examples

Input #1
123
Output #1
12321
Input #2
450
Output #2
45054

Sign in to submit a solution

Signing up is free and takes a minute.